Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
tacaswell merged 1 commit intomatplotlib:masterfromtimhoffm:set_ticks-labels
May 14, 2021

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedApr 22, 2021
edited
Loading

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 ofset_ticklabels(labels, **text_properties).
One can argue that this is actually too much, in which case we'd have to advertise

# Replaceset_ticks(locs)set_ticklabels(labels, **text_properties)# byset_ticks(locs, labels)tick_params(**text_properties)

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.

@timhoffmtimhoffm added this to thev3.5.0 milestoneApr 22, 2021
Copy link
Member

@jklymakjklymak left a 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...

timhoffm reacted with thumbs up emoji
@timhoffmtimhoffmforce-pushed theset_ticks-labels branch 2 times, most recently from5c3983f toddee963CompareApril 24, 2021 21:16
@jklymakjklymak requested a review fromanntzerMay 3, 2021 14:30
Copy link
Contributor

@anntzeranntzer left a 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.

@jklymak
Copy link
Member

I think the doc error is real:

/home/circleci/project/lib/matplotlib/axis.py:docstring of matplotlib.axis.Axis.set_ticklabels:10: WARNING: more than one target found for cross-reference 'FixedLocator': mpl_toolkits.axisartist.grid_finder.FixedLocator, matplotlib.ticker.FixedLocator

@jklymakjklymak marked this pull request as draftMay 10, 2021 22:24
@timhoffmtimhoffm marked this pull request as ready for reviewMay 14, 2021 00:53
@tacaswelltacaswell merged commitcfc6b1f intomatplotlib:masterMay 14, 2021
@timhoffmtimhoffm deleted the set_ticks-labels branchMay 14, 2021 07:52
@jklymakjklymak mentioned this pull requestJul 29, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@anntzeranntzeranntzer approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

Setting xticklabels causes warning related to FixedFormatter
5 participants
@timhoffm@jklymak@QuLogic@anntzer@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp