x-axis ticks and labels

Hi,
I am trying to relabel the x-axis on a plot. I want it to have 10 evenly spaced labels ranging from 274 at zero to 283 at one increment short of the axis. My code is as follows:

     im.axes.xaxis.set_major_locator(py.MaxNLocator(10))
     im.axes.xaxis.set_ticklabels(range(274,284))

My understanding is that MaxNLocator defines the number of spaces between labels. I've tried a few variations on the above but can only seem to get the last label to be 282 or 284. Anyone know what I am doing wrong.
Thanks
D