Changing the appearance of the labels

I'm working on some custom graphs [1] and want the ability to vary the
label based on the content of the label. The problem is that the label
text (majorTick.label1._mytext.get_text()) doesn't get filled until
the graph is plotted. Any help would be appreciated.


I basically want 'Jan 11' and 'noon' to be highlighted. At the moment
I'm just highlighting every fourth major tick.

Figured it out.

For posterity:

import matplotlib.cbook
majorLabelText = [axis.major.formatter(x,i) for i, x in

will get you the text and the labels are accessable via:

majorLabels = [tick.label1 for tick in axis.get_major_ticks() if
tick.label1On] +\
              [tick.label2 for tick in axis.get_major_ticks() if tick.label2On]

There's a convenience function for the major labels but not for the
minor, so I do it this way for both.