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]: set_ticks provides mysterious error message #26283
Comments
This is a side-effect of #24334. The error message is technically correct. You are doing two wrong things at the same time:
There's no obvious choice which error should get checked first. I suppose you would be less surprised for an (incorrect) kwarg intended to modify tick labels, I suggest to change the exception message to
This should make the error more clear. -> PR incoming. Note that we cannot easily check whether kwargs would be valid because we just pass them on to |
Bug summary
set_yticks(ticks, which="minor")
errors withValueError: labels argument cannot be None when kwargs are passed
.Code for reproduction
Actual outcome
Expected outcome
Two issues here:
which='minor'
is incorrect forset_yticks
, I should have doneminor=True
. It's a bit annoying thatwhich
is the kwarg for some things andminor
forset_yticks
.Second, the error message is somewhat annoying as I would have expected this call to work or give me an error for an incorrect kwarg.
Additional information
No response
Operating system
No response
Matplotlib Version
main
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None
The text was updated successfully, but these errors were encountered: