Reputation: 397
I want to extend the sliders applet example of the bokeh-website.
How can I "freeze" the current setting of the line and draw a new line in the same plot?
I am thinking in introducing option-boxes to change between the lines further down the road but so far I can't even get several (static) lines into the same "line" object.
If anyone knows some more documentation about the "bokeh widgets" that would be great, too.
Upvotes: 0
Views: 171
Reputation: 34568
In the callback (in this case, input_change
) you can do whatever you like, including creating new ColumnDataSource
objects, or calling new render functions like line
. Another option would be to start with a single multi_line
renderer in the setup step. For this renderer, the data stored in the ColumnDataSource
is a not just a list of numbers, it is a "list of lists of numbers". So every update you could append a new sublist of x
and y
values to the existing data source.
If you'd actually like help iterating on a real example, I encourage you to visit the Bokeh mailing list or GH issue tracker where you can have more of a back and forth exchange with Bokeh devs.
Upvotes: 1