下面的示例生成一个可以使用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。
你知道可能出了什么问题吗?
发布于 2019-07-26 03:44:25
要获得JupyterLab支持,需要执行两个额外的安装步骤:https://plot.ly/python/getting-started/#jupyterlab-support-python-35
编辑:我们已经在https://plotly.com/python/troubleshooting/上将我们的故障排除步骤合并到一个方便的指南中
发布于 2021-04-17 04:59:03
请按照以下步骤在jupyter notebook中显示图,请单击下面的链接查找有关以下命令及其用法的更多详细信息: JupyterLab Support for plotely
pip install jupyterlab "ipywidgets>=7.5"jupyter labextension install jupyterlab-plotly@4.14.3jupyter labextension install @jupyter-widgets/jupyterlab-managerjupyter lab发布于 2021-07-08 14:10:30
这是因为Nbextension。在可配置的nbextensions中。您必须禁用jupyterlab-plotly/extension和plotlywidget/extension。之后重启笔记本电脑。我希望它能起作用。here is image of disable
https://stackoverflow.com/questions/57208509
复制相似问题