I want to make some modifications to a few selected tick labels in a plot.
For example, if I do:
label = axes.yaxis.get_major_ticks()[2].label
label
The axes class has a set_yticklabels function which allows you to set the tick labels, like so:
#ax is the axes instance
group_labels = ['control', 'cold treatment',
'hot treatment', 'another treatment',
'the last one']
ax.set_xticklabels(group_labels)
I'm still working on why your example above didn't work.