Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Remove some examples from Userdemo#25801
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
legend box. | ||
By default, Axes fill the whole figure area, and thus legends placed outside would | ||
be cut of. We therefore use a layout manager to resize everything so that the legend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
becutof.Wethereforeusealayoutmanagertoresizeeverythingsothatthelegend | |
becutoff.Wethereforeusealayoutmanagertoresizeeverythingsothatthelegend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The legend example will be handled in a separate PR. - Excluded here for now.
fig, ax = plt.subplots(layout='constrained') | ||
ax.plot([1, 2, 3], label="line 1") | ||
ax.plot([3, 2, 1], label="line 2") | ||
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left', borderaxespad=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we also mention the newoutside upper left
(#19743)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The User Guide is pretty comprehensive on that. I'm not sure what the thinking is in general about duplicating information across examples/tutorials/guide.
https://matplotlib.org/devdocs/users/explain/axes/legend_guide.html#figure-legends
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for making me aware of the duplication. I'll check how to handle this best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The legend example will be handled in a separate PR. - Excluded here for now.
Ping? |
I will come back to this. |
I've reduced the PR to moving only two obvious gridspec examples. The rest will be handled in a separate PR. |
While we should consolidate the examples for creating complex Axeslayouts (or rather have a guide on this), that's beyond the scope ofthis PR. All these examples are special enough so that we want to keepthem until we have something better.
c5e4aec
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
…801-on-v3.10.xBackport PR#25801 on branch v3.10.x (Remove some examples from Userdemo)
…801-on-v3.10.0-docBackport PR#25801 on branch v3.10.0-doc (Remove some examples from Userdemo)
PR summary
Partly adresses#25800. See the individual commit messages.