Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 12fcb82

Browse files
committed
Add a note on working around limit expansion of set_ticks()
1 parent 7b574c3 commit 12fcb82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/axis.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,6 +1810,13 @@ def set_ticks(self, ticks, minor=False):
18101810
List of tick locations.
18111811
minor : bool, default: False
18121812
If ``False``, set the major ticks; if ``True``, the minor ticks.
1813+
1814+
Notes
1815+
-----
1816+
The mandatory expansion of the view limits is an intentional design
1817+
choice to prevent the surprise of a non-visible tick. If you need
1818+
other limits, you should set the limits explicitly after setting the
1819+
ticks.
18131820
"""
18141821
# XXX if the user changes units, the information will be lost here
18151822
ticks = self.convert_units(ticks)

0 commit comments

Comments
 (0)