DOC: Rewrite tickabel rotation example to use rotation_mode#31222
Merged
story645 merged 1 commit intomatplotlib:mainfrom Mar 2, 2026
Merged
DOC: Rewrite tickabel rotation example to use rotation_mode#31222story645 merged 1 commit intomatplotlib:mainfrom
story645 merged 1 commit intomatplotlib:mainfrom
Conversation
story645
reviewed
Mar 2, 2026
Member
story645
left a comment
There was a problem hiding this comment.
Can you please add tags since you're already updating the example?
d4cc9cc to
bd78ef8
Compare
Member
Author
|
Added tag |
story645
reviewed
Mar 2, 2026
| # - `matplotlib.axes.Axes.tick_params` / `matplotlib.pyplot.tick_params` | ||
| # - `matplotlib.axes.Axes.set_xticks` / `matplotlib.pyplot.xticks` | ||
| # | ||
| # .. tags:: component: ticks |
Member
There was a problem hiding this comment.
Also can you add plot-type:bar ?
Member
|
Anything folks would be likely to look this up based on, which I think here is bar charts, ticks, and labeling https://matplotlib.org/devdocs/devel/tag_guidelines.html ETA: also thanks! |
bd78ef8 to
f59b20b
Compare
Member
Author
|
Done. Note: https://matplotlib.org/devdocs/devel/tag_glossary.html#api-tags-what-content-from-the-api-reference-is-in-the-example listed |
story645
approved these changes
Mar 2, 2026
Member
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #31221.
The old version was not quite meaningful so I replaced the whole example.
I've left out the variant with
set_xticks(positions, labels, rotation=...). It has the disadvantage of updating the individual ticks instead of the defaults, which breaks when zooming. We therefore have substantially removed its use in our examples. I didn't want to discuss this topic here, and actually there are very few cases in which one still needs to set tick positions and labels explicitly as most of that can be handled through categorical units.