On Sun, Jul 19, 2009 at 7:03 AM, willemmerson<willemmer...@gmail.com> wrote:
>
> This is such a noob question but I can't seem to find the answer anywhere. I
> have a certain amount of something per month which I want to display on the
> y axis, I want the x axis to show years and months, i.e. it runs from 2003
> to 2009. I have no problem with the python side, just the plotting side. How
> do I do it?

matplotlib can plot native datetime objects, so if dates is a list of
datetimes, and vals is a list of values, you can:

  ax.plot(dates, vals)

See also these code examples:

  http://matplotlib.sourceforge.net/search.html?q=codex+DateFormatter

and the dates API documentation:

  http://matplotlib.sourceforge.net/api/dates_api.html

JDH

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to