On Dec 16, 2006, at 10:25 PM, John Hunter wrote:

>>>>>> "Simson" == Simson Garfinkel <[EMAIL PROTECTED]> writes:
>
>     Simson> Greetings. I've been having lots of luck with my date
>     Simson> plots.  But I've been having a problem getting the
>     Simson> dateformatter to work. I'm using the code below. The dates
>     Simson> keep getting formatted with the default, "Sep 28 2006"
>     Simson> instead of what I want, "Sep 28"
>
> This is an order of opertations problem.  The call to "plot_date" sets
> the DateFormatter, overriding your choices.  You need to set your
> custom formatter after the call to plot_date:

That's odd. I would think that it makes more sense to set the format  
*before* the data is plot, not after.

>
>
>      ax.plot_date(dates, vals, 'bo')
>      ax.xaxis.set_major_formatter(DateFormatter('%b %d'))
>      ax.yaxis.set_major_formatter(FormatStrFormatter('%3.0f KBps'))
>
> This is an annoyance that we can fix by setting the date formatter
> only if the current formatter is *not* a date formatter instance.

Probably a good thing for people like me who have never used Matlab.





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to