Python bokeh.models.Label() Examples
The following are 1
code examples of bokeh.models.Label().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
bokeh.models
, or try the search function
.
Example #1
Source File: plot.py From arlpy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def text(x, y, s, color='gray', size='8pt', hold=False): """Add text annotation to a plot. :param x: x location of left of text :param y: y location of bottom of text :param s: text to add :param color: text color (see `Bokeh colors`_) :param size: text size (e.g. '12pt', '3em') :param hold: if set to True, output is not plotted immediately, but combined with the next plot >>> import arlpy.plot >>> arlpy.plot.plot([0, 20], [0, 10], hold=True) >>> arlpy.plot.text(7, 3, 'demo', color='orange') """ global _figure if _figure is None: return _figure.add_layout(_bmodels.Label(x=x, y=y, text=s, text_font_size=size, text_color=color)) if not hold and not _hold: _show(_figure) _figure = None