首先,在这被标记为复制之前,我已经阅读了其他解决方案,不幸的是,它们都不适合我.
我的问题是,我想在Juypter Notebook(并且只在Jupyter Notebook)中显示bokeh绘图,而不是在新的选项卡/窗口中.
在官方文件here中,我被告知我只需要改变
output_file
到
output_notebook
Even though the plot is now displayed inline if I do that, bokeh won't s到p also opening a new tab and needlessly displaying the plot there.
Since I'm gonna create lots of plots in my project, it'd be very nice 到 not always have 到 close this new tab and return 到 notebook, but just have it s到p creating new tabs, just as it would work with e.g. matplotlib.
What confuses me is that if I load up the official tu到rial and enter code there, for example
import numpy as np
x = np.linspace(0, 10, 100)
y = np.exp(x)
p = figure()
p.line(x, y)
show(p)
没有打开新选项卡.如果我现在在我机器的Juypter笔记本上本地运行相同的代码,它会打开一个新标签.
I've been trying for a while now 到 fix this, any help would be very much appreciated.
先谢谢你,文森特