Why set_xticks doesn't set the labels of ticks?
.set_xticks()
on the axes will set the locations and set_xticklabels()
will set the displayed text.
def test(axes):
axes.bar(x,y)
axes.set_xticks(x)
axes.set_xticklabels([i+100 for i in x])
Another function that might be useful, if you don't want labels for every (or even any) tick is axes.tick_params
.
def test(axes):
axes.tick_params(axis='x',which='minor',direction='out',bottom=True,length=5)