I have tried a number of fixes but still can’t get plotting offline to work with jupyter lab. All my plots do show up in my plotly profile, but if I could get some help getting them to display in jupyter lab, I’d really appreciate it!
In this screenshot you provided it looks like you’re using the online (not offline) iplot method. I’m not sure why you’re not seeing the online plot, but in any case if you want to do offline plotting with iplot you need to use the plotly.offline.iplot method, and you need to have the @jupyterlab/plotly-extension extension installed.
Thanks for your help. I’ve tried using the plotly.offline.iplot method, and I do have the @jupyterlab/plotly-extension installed, but now I’m getting a weird issue where the plot output area is way too small. When I’ve tried with some of my own data, I’ve got a similar problem where the choropleth plot’s colorbar and title will show but not the map.
I think the issue might have to do with my @jupyterlab/plotly-extension installation. Could that be a reason for the strange figure output? I tried uninstalling the extension and reinstalling it, but that didn’t seem to help. Is this something you’ve seen before?
Hmm, that’s interesting. Here are a couple of thoughts. The @jupyterlab/plotly-extension tries to resize the figure responsively as the notebook’s width changes (by clicking and dragging usually). I have noticed sometimes that the plot shows up very small for a split-second in the beginning, and then expands to fill the output cell. So for some reason, the resize events aren’t being emitted or processed right in your case.
Does the plot react if you drag to resize the width of your browser?
Could you open an issue on the issue tracker for the @jupyterlab/plotly-extension? This way we can get the maintainer involved. In the issue, please include the output of pip list (and conda list if you’re using conda) and jupyter labextension list.
So the plots weren’t reacting when I tried resizing the width of the browser, but then I happened to check whether or not my browser (Firefox) was updated and it was not, and after it updated and I restarted the browser, the plots started showing up correctly.
Hi,
I have the same problem. I have checked the troubleshooting guide (thank you! @nicolaskruchten) but unfortunately could not fix the problem.
I am on macOS Catalina (10.15.3), Firefox 73.01, with the following installed:
$ jupyter --version
jupyter core : 4.6.1
jupyter-notebook : 6.0.1
qtconsole : not installed
ipython : 7.11.1
ipykernel : 5.1.3
jupyter client : 5.3.3
jupyter lab : 1.2.4
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 5.0.3
traitlets : 4.3.3
I’m running into this issue (graphs not rendering) as well and haven’t had any luck resolving it despite following the jupyter install (Getting started with plotly in Python) and troubleshooting guide (Troubleshooting in Python). I’ve even uninstalled jupyterlab and plotly a few times to no avail.
Hey @mail8, plotly and jupyter>=4.0 are not really compatible. We have quite some topics about this in the forum. The only solution I know of is downgrading jupyter to 3.9.