Boketh plot 隐藏 html 站点并仅在 Jupyter 中显示输出?
Boketh plot hide html site and show output only in Jupyter?
使用 bokeh 包,我创建了一个图形可视化,使用 show(plot)
输出显示在 Jupyter 中,同时在浏览器中打开一个新选项卡显示输出。我只想在 Jupyter 单元格中绘制它,而无需将绘图作为新的 html 文件打开。这有可能吗?
#Booketh plot
output_file("thisisaplot.html")
show(plot)
根据 documentation,您应该可以通过在调用 show()
.
之前调用 output_notebook()
来做到这一点
注意: 正如@bigreddot 所指出的,如果您在内核中使用 output_file
,可能不会立即更改为 output_notebook
.您将需要调用 reset_output()
,或重新启动内核以使更改生效。
使用 bokeh 包,我创建了一个图形可视化,使用 show(plot)
输出显示在 Jupyter 中,同时在浏览器中打开一个新选项卡显示输出。我只想在 Jupyter 单元格中绘制它,而无需将绘图作为新的 html 文件打开。这有可能吗?
#Booketh plot
output_file("thisisaplot.html")
show(plot)
根据 documentation,您应该可以通过在调用 show()
.
output_notebook()
来做到这一点
注意: 正如@bigreddot 所指出的,如果您在内核中使用 output_file
,可能不会立即更改为 output_notebook
.您将需要调用 reset_output()
,或重新启动内核以使更改生效。