matplotlib: show xticks only for discrete times

Mark Lawrence breamoreboy at yahoo.co.uk
Thu May 27 14:07:02 EDT 2010


On 27/05/2010 17:27, speedy66 wrote:
>
> I am plotting data that depends on time and height using pcolor.  The data is
> collected every 30 minutes, so there will be data at 1PM and again at 1:30PM
> for instance.
>
> My question deals with how to get xticks to show up only for time values
> that actually exist in the dataset.  As an example, ticks will currently
> appear at a time that corresponds to 1:24PM which is not a time where data
> exists.  These values change as I zoom in also.  I'm using
> matplotlib.pyplot.
>
> I've tried searching around for the answer, but have not been successful.
>
> Thanks in advance.
>
>
See 
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.xticks

matplotlib also has it's own mailing list.

HTH

Mark Lawrence




More information about the Python-list mailing list