Please read about the parameters that can be used on xticks()
, especially the optional part:
Source (matplotlib.pyplot.xticks)
matplotlib.pyplot.xticks(ticks=None, labels=None, *, minor=False,
**kwargs)[source] Get or set the current tick locations and labels of the x-axis.
Pass no arguments to return the current values without modifying them.
Parameters : ticks array-like, optional The list of xtick locations.
Passing an empty list removes all xticks.
labels array-like, optional The labels to place at the given ticks
locations. This argument can only be passed if ticks is passed as
well.
minor bool, default: False If False, get/set the major ticks/labels;
if True, the minor ticks/labels.
**kwargs Text properties can be used to control the appearance of the labels.