New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a method to "reset" a figure #5071
Comments
I would like the same. Looking for a way to easily clear a bokeh figure |
I also would need way of doing this. |
Would also need this. |
Also need this. |
Would need this too. |
Need this. |
Would also need this. |
After #7757 is merged, this will work:
|
the code given by bryevdv doesn't work, i get this js error " |
@nathan-vignal it's the opposite, your version of Bokeh is way too old. This feature landed in 0.12.16 and your output shows 0.12.7 |
If you are in a notebook, the simple solution can be to directly access the renderers in the figure p:
|
If plotting using # Make initial plot
signal_plt_cds = ColumnDataSource(data={"xs": [[0,1,2], [0,1,2]], "ys": [[1,2,3], [4,5,6]]})
feature_plt = figure(background_fill_color="#fafafa")
_ = feature_plt.multi_line("xs", "ys", source=feature_plt_cds)
# Reset plot then update
signal_plt_cds.data = {"xs": [], "ys": []} # reset work-around
signal_plt_cds.data = {"xs": [[0,1,2], [0,1,2]], "ys": [[10,20,30], [40,50,60]]} |
I want the ability to reset a figure via code in the same way as the figure reset tool.
I asked a related question on Stack Overflow, and it was recommended that I open an issue to track the request.
http://stackoverflow.com/questions/39278110/whats-the-command-to-reset-a-bokeh-plot
The text was updated successfully, but these errors were encountered: