How has dates and autoscaling changed from 0.91.2 to 0.98.5.2

So, my code has been running without flaw for quite some time now, and
thanks to the help of some folks here a few months back, I'm learning
more about matplotlib. But today I hit a wall.

Under matplotlib 0.91.2/Py2.5, I'm getting this graph:
http://joshuakugler.com/images/good_graph.png

Very nice, that's what I want!

But when I started running under matplotlib 0.98.5.2/Py2.6, I started
getting this:

http://joshuakugler.com/images/bad_scale.png

Not happy. I finally realized that autoscaling was enable for the
secondary y axis (right side), even though it's explicitly turned off
for the primar y axis (left side). So, I turn autoscaling off for the
secondary axis and got this:

http://joshuakugler.com/images/bad_noscale.png

Better (proper range) but I have numbers instead of dates.

No, I haven't assembled a minimal test case (this is quite a complex
system, I spent several hours on this thinking I had broken my code
until it occurred to me to run it on an old Py2.5/mpl 0.91.2 setup),
and no I haven't trolled the changelogs to see what change in behavior
I might have hit, but I was wondering if anyone any ideas of what I
need to be checking off the top of their heads.

I can tell you: the problem only occurrs on graphs that have a secondary
y axis, as you can see, the humidity graph is just fine.

Ideas? Sections of the manual I need to read?

I'm frustrated and burnt out from trying to figure this out, so I'm done
for the night...hopefully I'll have fresh insights and/or ideas come
morning.

j

P.S. Oh, and there is also a nice traceback I'm getting on other graphs
that seems to be related to this glitch, but I'll wait until I have the
first glitch fixed as the second glitch may get fixed in the process.

···

--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE

So, my code has been running without flaw for quite some time now, and
thanks to the help of some folks here a few months back, I'm learning
more about matplotlib. But today I hit a wall.

Under matplotlib 0.91.2/Py2.5, I'm getting this graph:
http://joshuakugler.com/images/good_graph.png
.. .snip
No, I haven't assembled a minimal test case (this is quite a complex
system, I spent several hours on this thinking I had broken my code
until it occurred to me to run it on an old Py2.5/mpl 0.91.2 setup),
and no I haven't trolled the changelogs to see what change in behavior
I might have hit, but I was wondering if anyone any ideas of what I
need to be checking off the top of their heads.

You are running a really old mpl -- the last 0.91 release was about 16
months ago. If you want resolution against the latest tree, you will
need to post an updated script exhibiting the problem.

P.S. Oh, and there is also a nice traceback I'm getting on other graphs
that seems to be related to this glitch, but I'll wait until I have the
first glitch fixed as the second glitch may get fixed in the process.

Ahh, this is a tantalizing morsel. If only we had the traceback, we
might be able to help...

JDH

JDH

···

On Wed, May 20, 2009 at 9:36 PM, Joshua J. Kugler <joshua@...1552...> wrote:

On Wednesday 20 May 2009, John Hunter said something like:

> So, my code has been running without flaw for quite some time now,
> and thanks to the help of some folks here a few months back, I'm
> learning more about matplotlib. But today I hit a wall.
>
> Under matplotlib 0.91.2/Py2.5, I'm getting this graph:
> http://joshuakugler.com/images/good_graph.png
>.. .snip
> No, I haven't assembled a minimal test case (this is quite a
> complex system, I spent several hours on this thinking I had broken
> my code until it occurred to me to run it on an old Py2.5/mpl
> 0.91.2 setup), and no I haven't trolled the changelogs to see what
> change in behavior I might have hit, but I was wondering if anyone
> any ideas of what I need to be checking off the top of their heads.

You are running a really old mpl -- the last 0.91 release was about
16 months ago. If you want resolution against the latest tree, you
will need to post an updated script exhibiting the problem.

I realize I was running an old MPL. Hmm...how does MPL define major
releases? I didn't think there would be API or functionality breakage
going from 0.91 to 0.98. So, does that mean if I update my program to
run with 0.98, it will no longer work correctly under 0.91?

> P.S. Oh, and there is also a nice traceback I'm getting on other
> graphs that seems to be related to this glitch, but I'll wait until
> I have the first glitch fixed as the second glitch may get fixed in
> the process.

Ahh, this is a tantalizing morsel. If only we had the traceback, we
might be able to help...

Yeah, I know...but I didn't how related it was. For those who care,
here it is, but I haven't been able to track down what's causing it,
other than somewhere along the line my start/end points are getting set
to inf and my code isn't doing it.

Traceback (most recent call last):
  File "./photizo_legacy_graph.py", line 187, in <module>
    'graphs', out_filename ))
  
File "/home/jkugler/programming/photizo/trunk/photizo/legacy/BaseFigure.py",
line 69, in createImage
    self.layout()
  
File "/home/jkugler/programming/photizo/trunk/photizo/legacy/GWSFigures.py",
line 31, in layout
    graph1.plotDate()
  
File "/home/jkugler/programming/photizo/trunk/photizo/legacy/BaseGraph.py",
line 400, in plotDate
    line = self.main_axes.plot_date(g[:,0], g[:,1])
  File "/usr/lib/python2.6/dist-packages/matplotlib/axes.py", line 3348,
in plot_date
    self.xaxis_date(tz)
  File "/usr/lib/python2.6/dist-packages/matplotlib/axes.py", line 2175,
in xaxis_date
    locator.refresh()
  File "/usr/lib/python2.6/dist-packages/matplotlib/dates.py", line 559,
in refresh
    dmin, dmax = self.viewlim_to_dt()
  File "/usr/lib/python2.6/dist-packages/matplotlib/dates.py", line 454,
in viewlim_to_dt
    return num2date(vmin, self.tz), num2date(vmax, self.tz)
  File "/usr/lib/python2.6/dist-packages/matplotlib/dates.py", line 249,
in num2date
    if not cbook.iterable(x): return _from_ordinalf(x, tz)
  File "/usr/lib/python2.6/dist-packages/matplotlib/dates.py", line 169,
in _from_ordinalf
    ix = int(x)
OverflowError: cannot convert float infinity to integer

···

On Wed, May 20, 2009 at 9:36 PM, Joshua J. Kugler <joshua@...1552...> wrote:

--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE