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

[MNT]: Inconsistent use of "inherit" and "auto" for color fallback in rcParams #28154

Open
anntzer opened this issue Apr 30, 2024 · 3 comments
Open

Comments

@anntzer
Copy link
Contributor

anntzer commented Apr 30, 2024

Summary

Some color rcParams that can fallback to another rcParam use "auto" to indicate that fallback (lines.markerface/edgecolor, boxplot.flierprops.markerfacecolor, axes.titlecolor, savefig.face/edgecolor), whereas others use "inherit" (legend.face/edgecolor, x/ytick.labelcolor).

There's also legend.labelcolor, which uses "None", but that's a much more complicated case (#28153).

Proposed fix

This should be made consistent. Safest (and not really an issue) would be to just support "auto" and "inherit" with the same meaning for all those rcParams; it would also be possible to pick a single winner, use it consistently, and deprecate usage of the other, although I'm not really sure it's worth the annoyance.

@story645
Copy link
Member

story645 commented May 1, 2024

it would also be possible to pick a single winner, use it consistently, and deprecate usage of the other, although I'm not really sure it's worth the annoyance.

pick a winner and silently support the other? I think for reading code or new commits, it's easier if there's only one consistently used throughout the codebase (I think inherit is more descriptive) but agree that deprecation probably isn't worth it.

@anntzer
Copy link
Contributor Author

anntzer commented May 1, 2024

I would prefer auto, agreeing with the reasoning at #15111 (comment). But sure, I guess we could switch places using inherit to use auto and keep undocumented support for inherit there.

@story645
Copy link
Member

story645 commented May 1, 2024

keep undocumented support for inherit there.

Forgot in my first comment, but that is one of the reasons we have the discouraged admonition. I'll defer to you on auto being the winner.

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

No branches or pull requests

2 participants