HoloViews 情节未关闭
HoloViews plot not closing
第一次尝试 HoloViews 我 运行 在绘图时遇到了问题。我测试了一个出现但无法关闭的箱线图。
我希望情节能出现在浏览器选项卡中...
为什么剧情会出现在浏览器上方,怎么关闭?
这是我所做的:
import holoviews as hv
#from holoviews import dim
hv.extension('bokeh')
from bokeh.sampledata.autompg import autompg as df
title = "MPG by Cylinders and Data Source, Colored by Cylinders"
boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title)
boxwhisker.options(show_legend=False, width=600)
测试于:
jupyterlab 0.33.12
python 2.7.15
Firefox Quantum 63.0.3(64 位)
为了正确呈现 HoloViews 图,需要安装 JupyterLab 扩展:
jupyter labextension install @pyviz/jupyterlab_pyviz
否则它会尝试将绘图附加到页面的正文,您最终会看到绘图悬停。安装扩展程序后,绘图应该出现在正确的位置。
我按照 philippjfr 的建议做了,但是 labextension 的安装反复卡住了。这是它的样子:
(base) C:\Users\xxx>jupyter labextension install @pyviz/jupyterlab_pyviz
> "C:\Program Files\nodejs\npm.CMD" pack @pyviz/jupyterlab_pyviz
pyviz-jupyterlab_pyviz-0.6.3.tgz
Incompatible extension:
"@pyviz/jupyterlab_pyviz@0.6.3" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/application
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/notebook
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/apputils
Found compatible version: 0.6.0
> "C:\Program Files\nodejs\npm.CMD" pack @pyviz/jupyterlab_pyviz@0.6.0
pyviz-jupyterlab_pyviz-0.6.0.tgz
> node C:\Users\xxx\AppData\Local\Continuum\anaconda2\lib\site-packages\jupyterlab\staging\yarn.js install
yarn install v1.6.0
(node:7700) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] Resolving packages...
⠁ @pyviz/jupyterlab_pyviz@file:../extensions/pyviz-jupyterlab_pyviz-0.6.0.tgz
第一次尝试 HoloViews 我 运行 在绘图时遇到了问题。我测试了一个出现但无法关闭的箱线图。 我希望情节能出现在浏览器选项卡中...
为什么剧情会出现在浏览器上方,怎么关闭?
这是我所做的:
import holoviews as hv
#from holoviews import dim
hv.extension('bokeh')
from bokeh.sampledata.autompg import autompg as df
title = "MPG by Cylinders and Data Source, Colored by Cylinders"
boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title)
boxwhisker.options(show_legend=False, width=600)
测试于:
jupyterlab 0.33.12
python 2.7.15
Firefox Quantum 63.0.3(64 位)
为了正确呈现 HoloViews 图,需要安装 JupyterLab 扩展:
jupyter labextension install @pyviz/jupyterlab_pyviz
否则它会尝试将绘图附加到页面的正文,您最终会看到绘图悬停。安装扩展程序后,绘图应该出现在正确的位置。
我按照 philippjfr 的建议做了,但是 labextension 的安装反复卡住了。这是它的样子:
(base) C:\Users\xxx>jupyter labextension install @pyviz/jupyterlab_pyviz
> "C:\Program Files\nodejs\npm.CMD" pack @pyviz/jupyterlab_pyviz
pyviz-jupyterlab_pyviz-0.6.3.tgz
Incompatible extension:
"@pyviz/jupyterlab_pyviz@0.6.3" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/application
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/notebook
>=0.17.2 <0.18.0 >=0.19.1 <0.20.0 @jupyterlab/apputils
Found compatible version: 0.6.0
> "C:\Program Files\nodejs\npm.CMD" pack @pyviz/jupyterlab_pyviz@0.6.0
pyviz-jupyterlab_pyviz-0.6.0.tgz
> node C:\Users\xxx\AppData\Local\Continuum\anaconda2\lib\site-packages\jupyterlab\staging\yarn.js install
yarn install v1.6.0
(node:7700) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] Resolving packages...
⠁ @pyviz/jupyterlab_pyviz@file:../extensions/pyviz-jupyterlab_pyviz-0.6.0.tgz