Infinite horizontal line in Bokeh

You are looking for “spans”: Spans (line-type annotations) have a single dimension (width or height) and extend to the edge of the plot area. Please, take a look at http://docs.bokeh.org/en/latest/docs/user_guide/basic/annotations.html#spans So, the code will look like: import numpy as np import bokeh.plotting as bk from bokeh.models import Span p = bk.figure() # Vertical line vline … Read more

How to change size of bokeh figure

If you’ve already created the plot, then you can use the bokeh.plotting.curplot() function to return the “current” plot, and then set its height and width attributes. If you are building up a Plot object using the lower-level interfaces (e.g. the examples in bokeh/examples/glyph/, then you can just set those attributes directly as well on the … Read more

How can I accomplish `set_xlim` or `set_ylim` in Bokeh?

One way is to can things with a simple tuple when creating a figure: figure(…, x_range=(left, right), y_range=(bottom, top)) But you can also set the x_range and y_range properties of a created figure directly. (I had been looking for something like set_xlim or set_ylim from matplotlib.) from bokeh.models import Range1d fig = make_fig() left, right, … Read more

tech