And*_*lin 4 python bokeh jupyter jupyter-notebook
我正在Jupyter制作一些笔记本,我决定用Bokeh创建互动图.真正让我感到困惑的两件事是图中左上角印有的图标,以及运行后打印的图标output_notebook()
.我想删除这些以帮助减少视觉混乱.
这是一个简单的脚本,可以在Jupyter中运行,演示我的问题:
import numpy as np
from bokeh.plotting import *
output_notebook()
N = 100
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select"
p1 = figure(title="Legend Example", tools=TOOLS)
p1.circle(x, y, legend="sin(x)")
p1.circle(x, 2*y, legend="2*sin(x)", color="orange", )
p1.circle(x, 3*y, legend="3*sin(x)", color="green", )
show(p1)
Run Code Online (Sandbox Code Playgroud)
这是我的机器上此代码的输出.
您的问题(使用output_notebook(..., hide_banner=True)
和plot.logo=None
)的答案可在文档中找到:
http://bokeh.pydata.org/en/latest/docs/reference/resources_embedding.html#bokeh.io.output_notebook
http://bokeh.pydata.org/en/latest/docs/reference/models/plots.html#bokeh.models.plots.Plot.logo