show
的调用替换为对save
的调用。使用 output_file({file_name})
替代 output_notebook()
,你可以调用 save
或 show
方法。记住每次调用 save 或 show 方法都会重写文件。
from bokeh.plotting import figure, output_file, save
p = figure(title="Basic Title", plot_width=300, plot_height=300)
p.circle([1, 2], [3, 4])
output_file("output_file_name.html")
save(p)