Open btlorch opened 1 month ago
Thanks for opening an issue.
A white area is opening, the controls appear, but there is no figure content.
So it looks like ipympl was properly installed and is working with Notebook 7, otherwise you wouldn't see the figure controls.
It's weird though that you are getting a white area. I will try to reproduce.
Thanks, I updated my initial post with the list of extensions. As far as I can see, the versions should be compatible according to the version compatibility table.
Yes, your installation looks perfectly fine.
What is your matplotlib version?
My matplotlib version is 3.9.0.
Thanks, I can reproduce your issue.
I wonder if this has to do with ipympl not supporting (it is). Friendly ping @ianhi, I suspect you're more familiar than me on this matter.plt.subplot
Wait, I see something really weird (same code, same environment, same server, different notebooks, on the left I can see the plot 100% of the time when executing, on the right I never see it):
Hm, I shut down and close the notebook, then reopen it, I can see the figure. When I create another new notebook, there the figure does not show up.
It seems we have some kind of race condition in the initialization of the plot in the case of Notebook 7. It was never reported in the case of JupyterLab AFAIK.
For reference this seems to be the case in JupyterLab 4.2.2 too:
I have happily used interactive plots in jupyter notebooks for years with
%matplotlib notebook
. Unfortunately, since version 7 was introduced, I have experienced troubles with getting interactive plotting to work properly. I read that version 7 requires installing ipympl and%matplotlib ipympl
.Today, I set up a fresh virtual environment and installed jupyter and ipympl. Figures are opening, the controls appear, a figure title appears, but the figure contains no content. There is also no error message on the browser's developer console.
Steps to reproduce:
Then I use the code from the basic example
A white area is opening, the controls appear, but there is no figure content.
I have seen several similar issues on Stackoverflow, where the solution is usually to upgrade or downgrade one of the packages. However, these answers have aged as newer versions came out in the meantime. Is there a general recipe to identify the issue when interactive plotting fails?
Versions