-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Change the size of legend markers... #12417
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
Comments
Saved my day. This really should work out of the box. Why do the legend markers change size at all...? I get the point where the only legend info is the size of the marker, but often it's colors/categories etc. that should be in the legend first and foremost. |
Usually you want a legend to show the marker in the same size as it appears in the plot. For a scatter with different sizes, there is no general way to determine which of the used sizes would be the best to show in the legend - this requires some user input. But of course feel free to make a suggestion here. Given two scatter plots
which "automatic" size would you expect to see in a legend? |
Just the normal fontsize of the legend? Or, maybe more accurately, a constant size so that the markers in the legend do not overlap -- something visually pleasing w.r.t. to the already fixed linespacing size (IOW, maybe slightly larger than the fontsize, but smaller than |
Actually, I don't know why #4247 wasn't pursued further. It looks much more straight forward than #4257. |
It'd be great if this is further pursued by someone who is able to implement it. It is one of the most important things that's missing in my day-to-day pyplot use. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Pity that this got closed, I missed the ping a year ago... 😑 |
@h-vetinari we are happy to re-open these bot-closed issues if someone is still interested in them. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Closed a PR that did this, which was probably over engineered. But the main idea is probably still useful.
#11127 is a bit different, it would create many legend entries for a single scatterplot. The idea here was to unify the size of different scatter plot's handles. Many options are shown in the stackoverflow question "setting a fixed size for points in legend". The easiest is just:
My faviourite, which I just added to that thread as well would be to use the update function of the Handler.
Originally posted by @ImportanceOfBeingErnest in #4257 (comment)
The text was updated successfully, but these errors were encountered: