Axis.
set_tick_params
Set appearance parameters for ticks and ticklabels.
For documentation of keyword arguments, see matplotlib.axes.Axes.tick_params().
matplotlib.axes.Axes.tick_params()