Skip to content

By default, don't change the figure face/edgecolor on savefig(). #15111

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
May 4, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 23, 2019

This seems to repeatedly confuse users.

Closes #7619; fixes https://gitter.im/matplotlib/matplotlib?at=5d5faff768406739f96b2673; alternate for #10023.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@ImportanceOfBeingErnest
Copy link
Member

The dpi argument accepts "figure". Would it make sense to stay consistent with that and use "figure" also for the edge-, and facecolor?

In general this makes much more sense to me than #10023. I don't understand the exitstack thingy so I will leave this for others to review.

@anntzer
Copy link
Contributor Author

anntzer commented Aug 23, 2019

For colors, there's already places that accept "auto" and places that accept "inherit" (specifically, legends). I'd rather not add a third spelling for the same (general) idea. (In fact I plan to deprecate "inherit" in favor of "auto", but that's a separate issue.)

@ImportanceOfBeingErnest
Copy link
Member

"figure" is still also clearer about the origin of the value. "auto" could be anything.

@anntzer
Copy link
Contributor Author

anntzer commented Aug 24, 2019

So what do you think the "auto" cases of lines.markerfacecolor, lines.markeredgecolor, boxplot.flierprops.markerfacecolor, and axes.titlecolor should be named?

@anntzer anntzer force-pushed the savefigcolorauto branch from e425586 to 57462b6 Compare May 4, 2020 10:35
Copy link
Member

@efiring efiring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea: a move towards the goal of minimizing surprise.

@tacaswell
Copy link
Member

I see your your point @ImportanceOfBeingErnest , however I think that the ambiguity of "auto" is a benefit here because we can use the same spelling across a wide range of contexts.

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.

Figure background colors
4 participants