Search code examples
plotlyjupyter-labplotly-express

Animated plotly-express graph not showing up in jupyter-lab


The following example produces an animated graph that can be displayed with jupyter notebook, but in jupyter-lab the graph does not show up.

%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])

Using plotly 4.0.0 and plotly_express 0.4.0.

Any idea what might be going wrong?


Solution

  • For JupyterLab support there are couple of additional installation steps: https://plot.ly/python/getting-started/#jupyterlab-support-python-35

    Edit: we've consolidated our troubleshooting steps into one handy guide at https://plotly.com/python/troubleshooting/