# matplotlib.axes.Axes.set_yticks¶

Axes.set_yticks(ticks, *, minor=False)

Set the yaxis' tick locations.

If necessary, the view limits of the Axis are expanded so that all given ticks are visible.

Parameters: tickslist of floatsList of tick locations. minorbool, default: FalseIf 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.