-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First of multiple plots blank in Jupyter when using iframe renderer. #3601
Comments
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson |
Thank you for the message. I have tried the same code again in the newer versions, and a similar error occurs. The first plot still doesn't show up, but the second plot is rendered both in its place and where it should ordinarily go. However, if each I set up the new environment following the steps in https://plotly.com/python/getting-started/ for conda. My Firefox version was 128.0, the Jupyter Lab version was 4.0.11, and the Plotly version was 5.22.0. I also tested with Jupyter Notebook 7.0.8 and saw the same behaviour. I can give more package version information if necessary. Finally, I went through the steps in https://plotly.com/python/troubleshooting/#jupyterlab-problems to see if any of them would make a difference, but the same behaviour still occurred. I do not personally rely on this behaving correctly; paired with the fact that no other users commented on this issue for a couple of years, it seems that not many people would be negatively impacted if this bug goes unfixed. Nonetheless, I thought I'd still report it just in case. |
thanks @cm-1 - I'll add it to our backlog, but it may be a while before someone can get to it. |
In trying to get Plotly plots to show in JupyterLab in my multi-environment setup, I came across two issues (#2508 and #2672) where one of the solutions mentioned is to set the default renderer to "iframe".
After consulting the Troubleshooting guide, I ultimately discovered that my mistake was. Even though I was using a 3.x version of JupyterLab, I still had to run
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyterlab-plotly
because of my multi-environment setup. Additionally, ipywidgets had to be installed in the environment with Plotly rather than the one with Jupyter. Before finding that solution, however, I tested the iframe solution, and noticed what seems to be a small bug.If the default renderer is "iframe" and two plots are created and shown in the same cell of a JupyterLab or Jupyter Notebook .ipynb notebook, the first plot will not render (blank space will be in its place), though the second cell will render fine. If one closes the .ipynb and then re-opens it, however, both plots will show up fine. Below is an example cell with two plots.
A screenshot of the output:
If more than two plots are used, generally, only the last one will show up without reopening the file. I think I observed a few times where only the first one would be blank and all remaining would show up, but if this does happen, it is rare, since I have been unable to reproduce that.
I first observed this in Firefox 97.0, JupyterLab 3.29, and Plotly 5.1.0. However, I also tested with the latest version of Plotly (5.6.0) and observed the same behaviour.
The text was updated successfully, but these errors were encountered: