From: Gary R. <ga...@em...> - 2004-06-22 09:27:31
|
As a followup to my reply to this (the suggestion found by searching the list archives and due to John Hunter), I tried an example errorbar plot and got a traceback. I think this is highlighting a bug as demonstrated by the following example. It's not an errorbar plot, but errorbar generates a traceback too. Danny, if you get a traceback, it'd be worth letting the list know: from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) semilogy(m, r) set(gca(), "yscale", "linear") show() works fine whereas from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) plot(m, r) set(gca(), "yscale", "log") show() generates a traceback: Traceback (most recent call last): File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 75, in callback self.draw() File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 42, in draw agg.draw() File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_agg.py", line 296, in draw self.figure.draw(self.renderer) File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\figure.py", line 130, in draw for a in self.axes: a.draw(renderer) File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\axes.py", line 597, in draw self.transData.freeze() # eval the lazy objects ValueError: Cannot take log of nonpositive value I think both should work. John, is this a bug? Gary Ruben -- _______________________________________________ Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! http://www.net2phone.com/cgi-bin/link.cgi?143 |