[SciPy-User] milliseconds in matplotlib.dates?

Gökhan Sever gokhansever@gmail....
Thu Mar 25 16:25:32 CDT 2010


On Thu, Mar 25, 2010 at 4:17 PM, Tom Kuiper <kuiper@jpl.nasa.gov> wrote:

>
> > Date: Thu, 25 Mar 2010 13:17:01 -0500
> > From: G?khan Sever <gokhansever@gmail.com>
> > Subject: Re: [SciPy-User] milliseconds in matplotlib.dates?
> > To: SciPy Users List <scipy-user@scipy.org>
> > Cc: Matplotlib Users <matplotlib-users@lists.sourceforge.net>
> >
> ...
> > 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")
> > plt.gca().xaxis.set_major_formatter(sci_fmt)
> >
> Here's how I modified my code:
> sci_fmt = FormatStrFormatter("%.2f")
> fig = figure()
> top_axes = subplot(211)
> top_axes.xaxis.set_major_formatter(sci_fmt)
> #plot_date(times,kurts,fmt='b-')
> #plot_date(times,kurt_sm,fmt='r-',label=("Hamming 1-sec FWHM"))
> plot(times,kurts,'b-')
> plot(times,kurt_sm,'r-',label=("Hamming 1-sec FWHM"))
> I then restarted 'ipython -pylab' because I've noticed that date
> formatting problems seems to linger even after a code change.  However,
> I see no change in behaviour.  I can get six 1-sec ticks across my
> plot.  If I expand the plot any more, the ticks disappear.
>
> Regards
>
> Tom
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>

Here is how it looks when I run your code till plot(times...)

http://img202.imageshack.us/img202/5415/ss1i.png

and one with zoom:

http://img411.imageshack.us/img411/8292/ss2el.png

I am not sure this could be related to the mpl version you have.


-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100325/a6aca923/attachment.html 


More information about the SciPy-User mailing list