H?ctor> Thanks John, everything works right now, except for fact
H?ctor> that I need to "clear" it on every iteration ... and the
H?ctor> line where I try to clear the previous figure
H?ctor> ("ax.clear()") is giving me troubles. Thanks in advance!
When you call subplot(1,1,1) it will return the previously defined one
and not create a new one. This is useful in interactive mode if you
want to switch between active subplots. Since all command work on the
active axes, you need a way to switch between them.
For repeatedly drawing figures in a loop, I recommend
for tel in tels:
figure(1)
...plot...
close(1)
rather than using clear. However, it does not appear from your
traceback that clear is directly causing the problem.
You are getting an overflow error on the call to log10(d) where d is
the datalim distance. It might be useful to check your datum and vals
ranges to make sure they are what you think they are and not some
obscenely large number.
What happens if you do
converter = PyDatetimeConverter()
e = [converter.epoch(thisd) for thisd in datum]
print 'date range', min(e), max(e)
print 'val range', min(vals), max(vals)
before the call to plot_date?
In any case, I think it better to return no ticks and warn rather than
die, so I've changed the ld = log10(d) line
in matplotlib.ticker.AutoLocator.get_locator to
try: ld = log10(d)
except OverflowError:
print >> sys.stderr, 'AutoLocator illegal datalim range %s; returning NullLocator'%d
return NullLocator()
You may want to try this after checking the above. Let me know how it
goes.
JDH