Let's assume that axarr[0]
has 4 visible x tick labels
([1,2,3,4]
) and that you want to have instead ['a', 'b', 'c', 'd']
You can set x tick labels with the Axes
method set_xticklabels
just doing this:
axarr[0].set_xticklabels(['a', 'b', 'c', 'd'])
Regarding
The commented out lines worked to change the labels when I was dealing with only one dataset but this command is not recognized with the methods I'm using
xticks
is not an Axes
method but a function in matplotlib.pyplot
, that (I think) wraps set/get_xticks
and set/get_xtickslabels
. So if you try to use it as in your code, you should get an error.