Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > matplotlib not plotting dates

Reply
Thread Tools

matplotlib not plotting dates

 
 
OKB (not okblacke)
Guest
Posts: n/a
 
      08-08-2006
I just downloaded matplotlib and I was trying to do some simple
date plots, but I'm running up against a puzzling error. Whenever I
attempt to plot dates, I get an exception on line 157 of
matplotlib/dates.py that says 'ValueError: need more than 0 values to
unpack'. That line is:

hour, remainder = divmod(24*remainder, 1)

I don't understand how divmod can be returning 0 values. I
inserted a statement into dates.py to "print divmod(24*remainder, 1)"
and, mind-bogglingly, it actually printed "()" sometimes.

The traceback indicates that this error is occuring when matplotlib
tries to set up the axis labels for the date plot. I don't know enough
about matplotlib to know exactly what it's doing, though.

Does anyone have any ideas for how to fix this? This error occurs
even with the matplotlib example scripts (e.g., date_demo1.py).

I'm running it on Windows XP, Python 2.4, and my matplotlibrc file
just has the default settings (TkAgg backend).

--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
matplotlib: Plotting a graph against time Durand Python 2 07-20-2008 01:57 PM
Dates dates dates dates... SQL and ASP.NET David Lozzi ASP .Net 1 09-30-2005 02:18 PM
Dates! Dates! Dates! PW ASP General 4 08-09-2004 04:42 PM
ANN matplotlib-0.30 - matlab style python plotting John Hunter Python 0 10-21-2003 07:42 PM
ANN: matplotlib 0.21 -- matlab compatible plotting in python John Hunter Python 0 08-26-2003 03:26 PM



Advertisments