Skip to content
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

Increase size of legend in Legend guide example #27764

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

saranti
Copy link
Contributor

@saranti saranti commented Feb 9, 2024

PR summary

While I was looking at issue #8789, I saw that the legend in the example under https://matplotlib.org/devdocs/users/explain/axes/legend_guide.html#legend-handlers was pretty cramped and could look better with an increase in the length of the handles.

Before:
before

After:
after

This also looks like the right spot to document this feature (which is what that issue is about). More could be said about it, maybe with its own example and heading.

PR checklist

@github-actions github-actions bot added the Documentation: user guide files in galleries/users_explain or doc/users label Feb 9, 2024
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

Can you add a comment or half a sentence on what handle length does?

@saranti
Copy link
Contributor Author

saranti commented Feb 11, 2024

Is that enough?

@story645
Copy link
Member

I think I'm confused on what handlelength does vs numpoints here

@saranti
Copy link
Contributor Author

saranti commented Feb 11, 2024

Numpoints adds the 4 dots to the legend entry and handlelength just increases the length of the handles.

The docs say "Line 1" now has 4 marker points, where "Line 2" has 2 (the default).

(It's really 1 though 🤔)

@dstansby dstansby added this to the v3.9.0 milestone Feb 12, 2024
@story645 story645 merged commit 641e3de into matplotlib:main Feb 12, 2024
21 checks passed
@saranti
Copy link
Contributor Author

saranti commented Feb 12, 2024

Should this also close issue #8789?

@saranti saranti deleted the legendguide branch March 1, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: user guide files in galleries/users_explain or doc/users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants