I have an array of measurements m, taken every minute. I plot these measurements against time by simply saying
import pylab as pl
pl.plot(range(len(m)), m)
this gives me minutes on the x-axis (just because I have measurements in minutes and range(len(m)) gives me integers). How do I quickly change the labeling of the x-axis into hours? I basically need to take the labeling mod 60, but I would like to have only integer hour values.
So in short I want to relabel every multiple of 60 on the x-axis.
Sorry rather than xlabels you need to create an axis and us ax.set_xticklabels:
or simply:
Either of these methods will work the first one may be easier if you need more complicated formatting.