【问题标题】:Animated plotly-express graph not showing up in jupyter-labjupyter-lab 中未显示动画绘图表达图
【发布时间】:2019-12-04 02:50:04
【问题描述】:

以下示例生成一个动画图表,可以使用jupyter notebook 显示,但在jupyter-lab 中该图表不显示。

%pylab inline
import plotly.express as px
gapminder = px.data.gapminder()
px.scatter(gapminder, x="gdpPercap", y="lifeExp", animation_frame="year", animation_group="country",
           size="pop", color="continent", hover_name="country",
           log_x=True, size_max=55, range_x=[100,100000], range_y=[25,90])

使用 plotly 4.0.0 和 plotly_express 0.4.0。

知道可能出了什么问题吗?

【问题讨论】:

    标签: plotly jupyter-lab plotly-express


    【解决方案1】:

    对于 JupyterLab 支持,还有几个额外的安装步骤:https://plot.ly/python/getting-started/#jupyterlab-support-python-35

    编辑:我们已将故障排除步骤整合到一份方便的指南中,地址为https://plotly.com/python/troubleshooting/

    【讨论】:

    【解决方案2】:

    按照以下步骤在 jupyter notebook 中显示绘图,请按照以下链接查找有关以下命令及其用法的更多详细信息: JupyterLab Support for plotely

    1. pip install jupyterlab "ipywidgets>=7.5"
    2. jupyter labextension install jupyterlab-plotly@4.14.3
    3. jupyter labextension install @jupyter-widgets/jupyterlab-manager
    4. jupyter lab

    【讨论】:

    • 我只想说,我没有运行第三个但是现在,我可以看到代码的输出。
    【解决方案3】:

    这是因为 Nbextension。在可配置的 nbextensions 中。您必须禁用jupyterlab-plotly/extensionplotlywidget/extension。之后重启笔记本。我希望它会工作。here is image of disable

    【讨论】:

      猜你喜欢
      • 2019-03-17
      • 2020-07-22
      • 2019-08-07
      • 1970-01-01
      • 1970-01-01
      • 2017-05-11
      • 2013-08-23
      • 2012-08-08
      • 1970-01-01
      相关资源
      最近更新 更多