Remove some examples from Userdemo#25801
Conversation
| 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.
| be cut of. We therefore use a layout manager to resize everything so that the legend | |
| be cut off. We therefore use a layout manager to resize everything so that the legend |
There was a problem hiding this comment.
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.
Should we also mention the new outside upper left (#19743)?
There was a problem hiding this comment.
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.
Thanks for making me aware of the duplication. I'll check how to handle this best.
There was a problem hiding this comment.
The legend example will be handled in a separate PR. - Excluded here for now.
|
Ping? |
|
I will come back to this. |
a97ccbb to
5a84688
Compare
|
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 Axes layouts (or rather have a guide on this), that's beyond the scope of this PR. All these examples are special enough so that we want to keep them until we have something better.
5a84688 to
afc5b0b
Compare
…801-on-v3.10.x Backport PR #25801 on branch v3.10.x (Remove some examples from Userdemo)
…801-on-v3.10.0-doc Backport PR #25801 on branch v3.10.0-doc (Remove some examples from Userdemo)
PR summary
Partly adresses #25800. See the individual commit messages.