Unable to update the same plot like plt.clf is used in matplotlib to overcome this and what can be used in bokeh?

Please help, like plt.clf is used in matplotlib to overcome this and what can be used in bokeh?

@kkr You need to describe your situation in more detail. Do you expect to be able to do this from python code (i.e. a Bokeh server app), or from javascript? Is this in a notebook (in which case push_notebook is an option)? What do you actually need to accomplish? If you are “clearing” to redraw the same glyphs with new data, you should just update the data. Bokeh is very good for updating data sources. If you are “clearing” to make a completely different kind of plot, you should just make a new plot and hide or remove the old plot entirely. Doing “surgery” to remove glyphs and their data sources from an existing plot (i.e. the direct analogue to clf) may work but would be discouraged and not idiomatic for Bokeh. But we can’t offer guidance until we know more about your use case.