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

BUG : correct default value alpha on legend patch #3773

Merged

Conversation

tacaswell
Copy link
Member

Fixes #3766

Adding legend.framealpha in #3369 changed the default value of
alpha on the legend patch from None -> 1 which has no visual effect
as to_rgba defaults to alpha=1 if no alpha is passed, but this
overrides setting the alpha component via set_facecolor(rgba_value).

This PR

  • addes a new validation function validate_float_or_None
  • changes legend.framealpha to default to None
  • adds test that with the default value of legend.framealpha
    the alpha value of the face can be set via a rgba value
  • adds tests that setting the framealpha to a non-None value
    ignores the alpha value passed to set_facecolor

Fixes matplotlib#3766

Adding `legend.framealpha` in matplotlib#3369 changed the default value of
alpha on the legend patch from `None` -> 1 which has no visual effect
as `to_rgba` defaults to alpha=1 if no alpha is passed, but this
overrides setting the alpha component via `set_facecolor(rgba_value)`.

This PR

 - addes a new validation function `validate_float_or_None`
 - changes legend.framealpha to default to `None`
 - adds test that with the default value of `legend.framealpha`
   the alpha value of the face can be set via a rgba value
 - adds tests that setting the framealpha to a non-None value
   ignores the alpha value passed to set_facecolor
@tacaswell
Copy link
Member Author

Can I review my own PR if I don't immediately remember writing it?

jenshnielsen added a commit that referenced this pull request Dec 30, 2014
BUG : correct default value alpha on legend patch
@jenshnielsen jenshnielsen merged commit 11c0bcc into matplotlib:v1.4.x Dec 30, 2014
@jenshnielsen
Copy link
Member

Looks good to me

@tacaswell tacaswell deleted the fix_legend.framalpha_default branch December 31, 2014 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants