Bokeh: save plot (as HTML) but don't show it Bokeh: save plot (as HTML) but don't show it python python

Bokeh: save plot (as HTML) but don't show it


Solution is to replace calls to show by calls to save.


Use output_file({file_name}) instead of output_notebook(). You can call either save or show method. Remember each time you call save or show method the file will be rewritten.

bokeh.io documentation

from bokeh.plotting import figure, output_file, savep = figure(title="Basic Title", plot_width=300, plot_height=300)p.circle([1, 2], [3, 4])output_file("output_file_name.html")save(p)