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

11,900

Solution 1

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/

Solution 2

Follow the below Steps to show plots in jupyter notebook, Please follow the below link to find more details on the below commands and thier usange : JupyterLab Support for plotely

  1. pip install jupyterlab "ipywidgets>=7.5"
  2. jupyter labextension install [email protected]
  3. jupyter labextension install @jupyter-widgets/jupyterlab-manager
  4. jupyter lab
Share:
11,900

Related videos on Youtube

Soren
Author by

Soren

Updated on June 04, 2022

Comments

  • Soren
    Soren almost 2 years

    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?

  • E. Zeytinci
    E. Zeytinci about 3 years
    I just want to say, I didn't run third one but right now, I can see the output of the code.