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

ENH: update ticks when requesting labels#23170

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
story645 merged 3 commits intomatplotlib:mainfromjklymak:enh-update-ticks
Jun 2, 2022

Conversation

jklymak
Copy link
Member

@jklymakjklymak commentedMay 31, 2022
edited
Loading

PR Summary

I think if the user asks for the tick labels, they should be allowed to waste a few cpu cycles actually getting the tick labels rather than forcing a whole draw. However, its possible I don't understand some subtlety.

Ref:#6103. Probably a lot more, and many stack overflow issues.

importmatplotlib.pyplotaspltimportnumpyasnpfig,ax=plt.subplots()ax.plot(range(10))labels=ax.xaxis.get_majorticklabels()print(labels)

Current behaviour

[Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]

Proposed behaviour

[Text(-2.0, 0, '−2'), Text(0.0, 0, '0'), Text(2.0, 0, '2'), Text(4.0, 0, '4'), Text(6.0, 0, '6'), Text(8.0, 0, '8'), Text(10.0, 0, '10')]

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

story645 reacted with thumbs up emoji
@jklymakjklymak marked this pull request as ready for reviewMay 31, 2022 15:34
@jklymak
Copy link
MemberAuthor

Is this a situation where our pre-commit CI hook contradicts what flake8 asks for?

@tacaswelltacaswell added this to thev3.6.0 milestoneJun 2, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@story645story645story645 approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@jklymak@tacaswell@story645

[8]ページ先頭

©2009-2025 Movatter.jp