如何制作情节,但不在散景中打开新标签?
how to make the plot, but not open a new tab in bokeh?
以下是我用 bokeh
制作绘图的方法
p1=make_plot(df)
output_file("out.html", title="out example")
show(p1)
这总是会打开一个新标签来刷新情节,但我不想那样。只需用以前版本的绘图刷新一个选项卡就足够了。
我怎样才能停止show()
打开一个新标签并制作新情节?
我尝试了 broweser=None
或 broweser=''
选项,但它不起作用。
您要找的是 save(),而不是 show()
from bokeh.io import output_file,show,save
from bokeh.plotting import figure
output_file('out.html',title='out example')
fig = figure()
show(fig) # will pop up in the browser
a = raw_input() # just press any key to continue
fig.line(range(10),range(10))
save(fig) # you can refresh your browser tab to see the change
在最后一步中使用 save
而不是 show
。这将保存绘图而不是在浏览器中打开它。
from bokeh.io import save
p1=make_plot(df)
output_file("out.html", title="out example")
save(p1)
以下是我用 bokeh
p1=make_plot(df)
output_file("out.html", title="out example")
show(p1)
这总是会打开一个新标签来刷新情节,但我不想那样。只需用以前版本的绘图刷新一个选项卡就足够了。
我怎样才能停止show()
打开一个新标签并制作新情节?
我尝试了 broweser=None
或 broweser=''
选项,但它不起作用。
您要找的是 save(),而不是 show()
from bokeh.io import output_file,show,save
from bokeh.plotting import figure
output_file('out.html',title='out example')
fig = figure()
show(fig) # will pop up in the browser
a = raw_input() # just press any key to continue
fig.line(range(10),range(10))
save(fig) # you can refresh your browser tab to see the change
在最后一步中使用 save
而不是 show
。这将保存绘图而不是在浏览器中打开它。
from bokeh.io import save
p1=make_plot(df)
output_file("out.html", title="out example")
save(p1)