8000 Add a note on working around limit expansion of set_ticks() by timhoffm · Pull Request #18087 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add a note on working around limit expansion of set_ticks() #18087

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,13 @@ def set_ticks(self, ticks, minor=False):
List of tick locations.
minor : bool, default: False
If ``False``, set the major ticks; if ``True``, the minor ticks.

Notes
-----
The mandatory expansion of the view limits is an intentional design
choice to prevent the surprise of a non-visible tick. If you need
other limits, you should set the limits explicitly after setting the
ticks.
"""
# XXX if the user changes units, the information will be lost here
ticks = self.convert_units(ticks)
Expand Down
0