Skip to content

fix rcParams legend.facecolor and edgecolor never being used #4362

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

Merged
merged 1 commit into from
Apr 21, 2015
Merged

fix rcParams legend.facecolor and edgecolor never being used #4362

merged 1 commit into from
Apr 21, 2015

Conversation

jclevesque
Copy link
Contributor

They were correctly read from rcParams, but ignored after that. See the old code :

if rcParams["legend.facecolor"] == 'inherit':
    facecolor = rcParams["axes.facecolor"]
else:
    facecolor = rcParams["legend.facecolor"]

if rcParams["legend.edgecolor"] == 'inherit':
    edgecolor = rcParams["axes.edgecolor"]
else:
    edgecolor = rcParams["legend.edgecolor"]

self.legendPatch = FancyBboxPatch(
    xy=(0.0, 0.0), width=1., height=1.,
    facecolor=rcParams["axes.facecolor"],
    edgecolor=rcParams["axes.edgecolor"],
    mutation_scale=self._fontsize,
    snap=True
    )

…end..."], but never being used in the call to FancyBboxPatch
@tacaswell
Copy link
Member

Good catch! That is my bad.

@tacaswell tacaswell added this to the next point release milestone Apr 20, 2015
@jenshnielsen
Copy link
Member

Would be good to have a test for this i guess?

@tacaswell
Copy link
Member

Yeah, the PR that got merged was my proportional for how to fix this and I was waiting for Eric to agree it was reasonable before I added tests.

tacaswell added a commit that referenced this pull request Apr 21, 2015
FIX : rcParams legend.facecolor and edgecolor never being used

cleans up #4193
@tacaswell tacaswell merged commit 3a66265 into matplotlib:master Apr 21, 2015
@tacaswell
Copy link
Member

I have added an issue and self assigned to take care of cleaning up the tests/documentation for this. @jclevesque Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants