How to refresh Bokeh Document
问题 I would like to refresh a bokeh document so I can replace old plots with new ones. However, right now I just get the new plots appended to the document so the old ones don't go away. #myfile.py from bokeh.plotting import curdoc, figure doc = curdoc() p1 = figure(width=1500, height=230, active_scroll="wheel_zoom") doc.add_root(p1) doc.clear() p2 = figure(width=1500, height=500, active_scroll="wheel_zoom") doc.add_root(p2) This results in the second plot being displayed after the first plot,