Using the server, I try to add new lines to a figure when pressing one of the two buttons (top button: one new line at a time, below: three new lines at a time).
I have a hard time to make it work properly: the top button works from time to time (never the 2nd time), and seems to depend on the time I am waiting between two clicks. When the interval is too short, it bugs quickly, nothing happens anymore.
The button below is behaving even worse, never get the three new lines.
Moreover, the printed columndatasource seems to loose columns. With larger arrays, lines start flickering.
What is the proper way to use bokeh for dynamic addition of new lines ?
Is there some timeout to respect between operations linking the server and the client ?
from bokeh.plotting import figure
from bokeh.io import curdoc,output_file, show
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Button
from bokeh.layouts import column
s = c.add([el+i for el in y])
for j in range(3):
s = c.add([el+i+j for el in y])
p = figure(plot_width=400, plot_height=400)