-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Multiple legends does not work with subplots #4264
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
Comments
It may be that JupyterLite is built against an older version of Plotly.js than the one targeted by Plotly.py 5.15 ... what version number do you see when hovering your cursor over the Plotly logo that appears in the top-right of the rendered figure when the cursor is above the figure? |
@nicolaskruchten It says it was built with plotly.js 2.20. I also tried pip installing plotly==5.15.0, and that says it was produced with plotly.js 2.12.1. How can I install plotly 5.15.0 to make sure it uses plotly.js >=2.22? I should note that when I installed plotly locally, I was running the example in a VS code notebook. In my conda env, I'm using:
|
Unfortunately both VSCode and JupyterLite I believe bundle their own versions of Plotly.js and don't make it possible for users to upgrade... For now the most reliable environment within which you can install Plotly.py and get the matching version of Plotly.js is Jupyter Lab. |
I moved the code to a |
@LiamConnors
According to an email I received on June 21st regarding updates to plotly 5.15.0, I should be able to include multiple legends on a figure with subplots. I copy and pasted the example into a JupyterLab Lite notebook and confirmed I was using plotly 5.15.0 by printing
plotly.__version__
. When I run the code, it does not match the image in the email. Instead of having two legends, only one legend is included and moved tox: 0.4
.Any ideas as to why I cannot reproduce the example provided in the email?
Code from the email:
The text was updated successfully, but these errors were encountered: