Closed
Description
Bug summary
set_yticks(ticks, which="minor")
errors with ValueError: labels argument cannot be None when kwargs are passed
.
Code for reproduction
fig, ax = plt.subplots(figsize=(5.4, 5.4), layout='constrained')
x = np.arange(100)
for nn, ax in enumerate(axs):
ax.plot(x, x)
ax.set_yticks(np.arange(0, 100.1, 100/3))
ax.set_yticks(np.arange(0, 100.1, 100/30), which='minor')
Actual outcome
ValueError: labels argument cannot be None when kwargs are passed
Expected outcome
Two issues here: which='minor'
is incorrect for set_yticks
, I should have done minor=True
. It's a bit annoying that which
is the kwarg for some things and minor
for set_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