-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Transparency not respected in legendPatch #3766
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
I am a bit preplexed by this. It looks like the patch attached to the legend is a |
853c26a In other words, adding an rcParam changed _alpha of None to a default value; and once that is done, you are stuck with it until you explicitly change it! The painful saga of alpha-handling continues... As a matter of style, the relevant bit of code in legend: if framealpha is None:
self.get_frame().set_alpha(rcParams["legend.framealpha"])
else:
self.get_frame().set_alpha(framealpha) is obfuscated by the use of the get_frame() method; what it gets is the |
I've confirmed that the behavior exhibits after version 1.4.0 (1.3.1 and 1.4.0 are okay, >=1.4.1 not okay) |
I have a fix for this, just need to add some tests. |
It seems after Matplotlib 1.3.1 (1.4.1, 1.4.2, not sure about 1.4.0) that setting the transparency of the
facecolor
oredgecolor
properties of alegendPatch
is not respected. Both properties can be changed together usinglegendPatch.set_alpha(...)
, but they cannot be set independently. Following is a MWE. Here, the legend'sfacecolor
is changed, but the alpha specification (0.2) is ignored. A call tolegendPatch.get_facecolor()
confirms this.The text was updated successfully, but these errors were encountered: