>>>>> "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:


     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.

JDH

-------------------------------------------------------------------------
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