-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Patch edgecolor of a legend item does not follow look of figure #7375
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
The culprit is https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/patches.py#L295
i.e. the edgecolor of the legend patch inherits the alpha value set by default. Fundamentally, this is again a consequence of the design choice of having alpha as a separate attribute, when it should really be part of the color spec (of course this doesn't prevent having helper functions to access and modify the alpha value). As a stopgap measure, I think we can fix |
BUG: in Patch.update_from, use private variables. Closes #7375.
closed in #7497 |
It's not about the edgecolor of the legend box, but of the legend items (if they are a patch). In the following example, the clear border around the patches in the legend is a bit surprising to me, and contrasts the look of the figure itself.
Example code:
As a notebook: http://nbviewer.jupyter.org/gist/jorisvandenbossche/68b2831ea2b87c76d944e93edc134d59
This issue now surfaces because the default changed to no border for patches, and as such for the histogram in this example (before 2.0, this would not be an issue with the default look). And it becomes more apparent due to the use of a lower
alpha
in this specific example.Not sure if this is still the case with master, but I tested with matplotlib 2.0.0b4, on Python 3.5 / Ubuntu (installed from conda-forge)
The text was updated successfully, but these errors were encountered: