I have a bokeh (v0.11) serve app that produces a scatter plot using (x,y) coordinates from a data frame. I want to add interactions such that when a user either selects points o
If you are streaming data, then there is a related answer here: Timeseries streaming in bokeh
If you need update everything at once, then you can do that, and my suggestion is your Strategy 1, which is demonstrated, e.g. here:
https://github.com/bokeh/bokeh/blob/master/examples/app/sliders.py
The particular thing to note is that you really have to update all of source.data
in one go. One of the assumptions is that all the columns of a column data source always have the same length. Updating individual columns runs the risk of breaking this assumption, which can cause problems. So you want to update all at once, with something like:
# Generate the new curve
x = np.linspace(0, 4*np.pi, N)
y = a*np.sin(k*x + w) + b
source.data = dict(x=x, y=y)