matplotlib.axes.Axes.set_xticks
-
Axes.set_xticks(self, ticks, *, minor=False)
-
Set the xaxis' tick locations.
If necessary, the view limits of the Axis are expanded so that all given ticks are visible.
Parameters: -
tickslist of floats
-
List of tick locations.
-
minorbool, default: False
-
If
False
, set the major ticks; ifTrue
, 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.
-
Examples using matplotlib.axes.Axes.set_xticks
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.1/api/_as_gen/matplotlib.axes.Axes.set_xticks.html