Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add labels parameter to set_ticks()#20047
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
looks good. Prob needs API note, or what's new...
5c3983f
toddee963
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
approving modulo addressing (or rejecting) the two comments above.
Uh oh!
There was an error while loading.Please reload this page.
I think the doc error is real:
|
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
As proposed in#18848 (comment) and discussed on today's dev call.
Closes#18848,#19016.
kwargs: I've added kwargs for text properties. While this makes the function do a lot (borderline of too much), it is necessary if we want a full replacement of
set_ticklabels(labels, **text_properties)
.One can argue that this is actually too much, in which case we'd have to advertise
Return value:
set_ticks()
has an undocumented return value (list of the Tick instances). Whileplt.xticks()
returns a tuple(locs, labels)
(list of Ticks and list of Texts), I don't want to do this here. First, I don't think the setter should return anything at all (but that's how it is for now and deprecating that is probably not worth it). Second, since labels are optional, I'm not even sure if we would want to give the texts only iflabels
is not None.