Python - Holoviews 没有图像
Python - Holoviews no image
我在 Python 3.6 中使用 Spyder IDE 以及在 canopy 环境中的 Jupyter notebook 执行以下代码。代码在两种环境中都可以正常执行,但我没有看到任何图像输出。有人可以指导我如何输出或查看图像。
import numpy as np
import holoviews as hv
hv.extension('bokeh')
hv.Sankey([
['A', 'X', 5],
['A', 'Y', 7],
['A', 'Z', 6],
['B', 'X', 2],
['B', 'Y', 9],
['B', 'Z', 4]]
).options(width=600, height=400)
这是我看到的输出
hv.Sankey([
['A', 'X', 5],
['A', 'Y', 7],
['A', 'Z', 6],
['B', 'X', 2],
['B', 'Y', 9],
['B', 'Z', 4]]
).options(width=600, height=400)
Out[11]: :Sankey [start,end] (Value)
您可以使用 python anaconda 到 运行 Jupyter 笔记本并尝试执行该程序。希望有用。
图片Linkhttps://i.gyazo.com/e6713a933ac73a3c2bfd159f432c4f7f.png
我在 Python 3.6 中使用 Spyder IDE 以及在 canopy 环境中的 Jupyter notebook 执行以下代码。代码在两种环境中都可以正常执行,但我没有看到任何图像输出。有人可以指导我如何输出或查看图像。
import numpy as np
import holoviews as hv
hv.extension('bokeh')
hv.Sankey([
['A', 'X', 5],
['A', 'Y', 7],
['A', 'Z', 6],
['B', 'X', 2],
['B', 'Y', 9],
['B', 'Z', 4]]
).options(width=600, height=400)
这是我看到的输出
hv.Sankey([
['A', 'X', 5],
['A', 'Y', 7],
['A', 'Z', 6],
['B', 'X', 2],
['B', 'Y', 9],
['B', 'Z', 4]]
).options(width=600, height=400)
Out[11]: :Sankey [start,end] (Value)
您可以使用 python anaconda 到 运行 Jupyter 笔记本并尝试执行该程序。希望有用。
图片Linkhttps://i.gyazo.com/e6713a933ac73a3c2bfd159f432c4f7f.png