-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
which={"major", "minor", "both"} vs minor={True, False} #11773
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 find “which” obscure. What about a “major” and a “minor” bool kwarg? |
I wouldn't want to make separate "major" and "minor" args. It feels more natural to specify which ticks you want in a single arguement. No strong arguments bu with two separate args:
The naming "which" is not really good as a standalone name. However, in the context of a function signature |
Not sure that I'm not following your second point. If |
I think I'm warming up to (major: bool, minor: bool). The problem of OTOH the axis keyword does take values "x", "y", and "both"; we don't have e.g. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
It would be good to at least list the APIs where this happens before deciding what to do with it. |
Quick grepping: which
minor
major(Had to skip the "def "-part to get some hits.)
Not perfect, but gives some indication at least... (There are several other APIs where |
The first |
tl;dr Changing any of this is not worth the hassle. We should live with the current slight imperfections.Terminology: I use tri-state for the logical major/minor/both case and two-state for the logical major/minor case. Think of this as independent on the way we describe it via keyword arguments. 1) We'll have a mixture of two-state and tri-state functionsFor example in 2) Tri-state parameter variants
3) Two-state parameter variants
SummaryWe have a mixture of two-state and tri-state functions. Tri-state functions must have the The only function we could discuss about is the ugly parameter redundancy in
|
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
While the mixture is not great, I believe there is no reasonable way to improve. We need to live with the current state. See #11773 (comment) for details. |
Just mentioning it here, not that it's particularly urgent: for specification of major vs minor ticks, there is currently a mix between methods that take a
which
("major"/"minor"/"both" (if applicable)) kwarg and those that take aminor
(bool) kwarg. And then there are those that try to please everyone, likeget_ticklabels
:... ugh.
I'd suggest homogenizing to use
which
(as that can also handle "both"), even in the cases where "both" is not valid (in which case we just accept "major"/"minor").Or we can wait for the ticking refactor proposed in #5665...
The text was updated successfully, but these errors were encountered: