I create a figure in a function, e.g.
import numpy
from bokeh.plotting import figure, show, output_notebook
output_notebook()
def make_fig():
rows = col
As of Bokeh 2.X, it seems it is not possible to replace figure.{x,y}_range
with a new instance of Range1d
from DataRange1d
or vice versa.
Instead one has to set figure.x_range.start
and figure.x_range.end
for a dynamic update.
See https://github.com/bokeh/bokeh/issues/8421 for further details on this issue.