[SciPy-User] milliseconds in matplotlib.dates?

Gökhan Sever gokhansever@gmail....
Thu Mar 25 13:17:01 CDT 2010

On Wed, Mar 24, 2010 at 1:25 PM, Tom Kuiper <kuiper@jpl.nasa.gov> wrote:

> Greetings, everyone.
> I have some time tagged data spanning about three minutes with 4 ms
> resolution.  If I plot these with plot_data and focus in on some event
> at high resolution I lose the tick marks.  It seems that the minimum
> tick spacing is 1 sec.  That appears consistent with strftime which does
> not provide for fractional seconds.
> I thought I saw this issue go by not long ago but I don't recall the
> solution, if any.
> I'm using python 2.5.2 and matplotlib 1.1.0.
> Thanks and regards,
> Tom


As far as I know SecondLocator() is the smallest it gets for time-date
plotting in matplotlib. Probably a new class needs to be written for
MilliSecondLocator() in dates.py

Alternatively, you might use just floating-point version of your time values
and with a little adjustment (Ryan mentioned this in the recently, and will
forward there for other suggestions) millisecond resolutions should be
visible when zoomed in furthest.

Something like:

sci_fmt = plt.FormatStrFormatter("%.2f")

By the way, where did you get mpl v1.1.0? Mine says:

In[19]: matplotlib.__version__
Out[19]: '1.0.svn'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100325/7f44a69b/attachment.html 

More information about the SciPy-User mailing list