-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
figure.autolayout rc param interferes with FacetGrid legend position #2496
Comments
matplotlib version is 3.3.4 |
What matplotlib backend are you using? And more generally, how are you making your plots? (In a notebook? In a terminal? In a script and saving? etc.) Putting the legend outside the axes does require seaborn to be able to live draw the figure so that it can calculate the new size that it will need to be with the external legend, which some backends might not support. |
I tried generating the plots in JupyterLab.
And in an web-application (Plotly/Dash) that currently uses 'Agg' to generate figures. This the current environment: `name: py3
|
BTW the environment you're using has a lot in it ... while I don't have any specific hypotheses about other libraries causing problem, it might be a good idea to create a new environment with a minimal install of seaborn and its dependencies to see if you reproduce the issue there. |
Hm, I created a new environment and installed the python kernel to my JupyterLab (3.0.9) with:
I get the same result with the legend inside. I looked for a matpotlib config file and deleted The other example that you provided plots an empty pair of axes. I would share a picture, but I am missing the upload function here. |
Hm, do you have any matplotlibrc files that might be getting picked up? What is the output of |
RcParams({'_internal.classic_mode': False, |
Not sure where else to look. I already deleted |
fixes it. |
Yes! Sorry I think I have encountered this once before. But that will do it. |
Thanks for your time! |
I actually think this can be handled in seaborn, using |
* Disable autolayout rcparam when constructing Facet/PairGrid Closes #2496 * Update release notes [skip ci]
I am pretty happy about that new feature
legend_out
. However, I cannot reproduce the figures shown in the documentation.Am I doing something wrong or is this feature available only in the development branch?
When I use this code from the documentation:
The legend shows up inside the graph. And passing
legend_out=False
orTrue
looks identical.And this creates a legend on the lefthandside with a box around:
Did I forget something? Is there any other dependency like the matplotlib backend for example?
The text was updated successfully, but these errors were encountered: