8000 Remove some examples from Userdemo by timhoffm · Pull Request #25801 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

timhoffm
Copy link
Member
@timhoffm timhoffm commented May 1, 2023

PR summary

Partly adresses #25800. See the individual commit messages.

@timhoffm timhoffm added this to the v3.8.0 milestone May 1, 2023
@timhoffm timhoffm changed the title Remove userdemo Remove some examples from Userdemo May 1, 2023
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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)
Copy link
Member

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 new outside upper left (#19743)?

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member Author

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.

@timhoffm timhoffm marked this pull request as draft May 2, 2023 11:32
@ksunden ksunden modified the milestones: v3.8.0, v3.8-doc Aug 8, 2023
@QuLogic
Copy link
Member
QuLogic commented Aug 3, 2024

Ping?

@timhoffm
Copy link
Member Author
timhoffm commented Aug 5, 2024

I will come back to this.

@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Feb 6, 2025
@timhoffm timhoffm modified the milestones: v3.8-doc, v3.10.0-doc Feb 6, 2025
@timhoffm
Copy link
Member Author
timhoffm commented Feb 6, 2025

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.
@github-actions github-actions bot added the Documentation: user guide files in galleries/users_explain or doc/users label Feb 6, 2025
@timhoffm timhoffm marked this pull request as ready for review February 6, 2025 12:05
@QuLogic QuLogic merged commit c5e4aec into matplotlib:main Feb 7, 2025
22 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 7, 2025
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 7, 2025
QuLogic added a commit that referenced this pull request Feb 7, 2025
…801-on-v3.10.x

Backport PR #25801 on branch v3.10.x (Remove some examples from Userdemo)
@timhoffm timhoffm deleted the remove-userdemo branch February 7, 2025 05:42
timhoffm added a commit that referenced this pull request Feb 7, 2025
…801-on-v3.10.0-doc

Backport PR #25801 on branch v3.10.0-doc (Remove some examples from Userdemo)
@ksunden ksunden mentioned this pull request Mar 3, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples Documentation: user guide files in galleries/users_explain or doc/users Documentation
Projects
None yet
3C88
Development

Successfully merging this pull request may close these issues.

4 participants
0