Ahah, I just blindly copied the format string from the manual, which contains a typo.
The format string in the manual: %b %d.
What it should be: %b %y (might want to change this in the manual
sometime so that fig 5.2 is correct). This will get you jan 92, feb 92,
mar 92 and so on.
For full details on all the date format strings, see http://docs.python.org/lib/module-time.html
BTW, very slick how easy the labels can be rotated!
On 1/11/06, John Hunter <jdhunter@…4…> wrote:
> Hello all - I tried to have dates along the x-axis and tried > to plot it in the month-year format. There is a nice > example in Fig. 5.2 of the manual. > Problem is, the year always plots as year 01, even in > Fig. 5.2! Check it out. > I just tried this on 0.86, and it is still wrong. > Easy to fix? Easy workaround?
Look at the function matplotlib.dates.date_ticker_factory, which looks
at the date range of your axis and returns a locator and date string
There must be an error in one of the format strings. I don’t have
time to look at it right now, but it is fairly easy to grok the code.
Sometimes these errors occur just if we accidentally used an upper
case letter in a format string or vice versa…
I you hurry, you can probably send a fix in time for the 0.86.1