Hi there
I use matplotlib from within ipyton (simply by calling $ipython -pylab
in a shell window). I'm using the debian packages as mentioned on the
matplotlib homepage on a Debian sarge system.
Everything works fine except the semilogy command behaves a bit strange
(I'm new to matplotlib so it is maybe my mistake).
After starting ipython in pylab mode I do the following:
In [1]: x=arrayrange(0.0,100.0);
In [2]: plot(x)
Out[2]: [<matplotlib.lines.Line2D instance at 0x4437a30c>]
until here everything works fine (I use the TkAgg interface for
interactive plotting, hold is set to False).
If I continue now with
In [3]: semilogy(x)
···
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/home/eugen/<console>
/usr/lib/python2.3/site-packages/matplotlib/pylab.py in semilogy(*args,
**kwargs)
2089 hold(b)
2090 else:
-> 2091 draw_if_interactive()
2092
2093 hold(b)
/usr/lib/python2.3/site-packages/matplotlib/backends/__init__.py in
draw_if_interactive()
39 def draw_if_interactive():
40 draw_if_interactive._called = True
---> 41 __draw_int()
42 # Flag to store state, so external callers (like ipython)
can keep track
43 # of draw calls.
/usr/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py in
draw_if_interactive()
56 figManager = Gcf.get_active()
57 if figManager is not None:
---> 58 figManager.show()
59
60
/usr/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py in
show(self)
275 # anim.py requires this
276 if sys.platform=='win32' : self.window.update()
--> 277 else: self.canvas.draw()
278 self._shown = True
279
/usr/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py in
draw(self)
140
141 def draw(self):
--> 142 FigureCanvasAgg.draw(self)
143 tkagg.blit(self._tkphoto, self.renderer._renderer, 2)
144 self._master.update_idletasks()
/usr/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py in
draw(self)
306 self.renderer = RendererAgg(w, h, self.figure.dpi)
307 self._lastKey = key
--> 308 self.figure.draw(self.renderer)
309
310 def tostring_rgb(self):
/usr/lib/python2.3/site-packages/matplotlib/figure.py in draw(self,
renderer)
332
333 # render the axes
--> 334 for a in self.axes: a.draw(renderer)
335
336 # render the figure text
/usr/lib/python2.3/site-packages/matplotlib/axes.py in draw(self,
renderer)
1167 if not self.get_visible(): return
1168 renderer.open_group('axes')
-> 1169 self.transData.freeze() # eval the lazy objects
1170 self.transAxes.freeze() # eval the lazy objects
1171 if self.axison:
ValueError: Cannot take log of nonpositive value
you see what happens. Since the array starts with 0.0 the error message
is ok. But
In [4]: x=x+1.0;
In [5]: semilogy(x)
gives the same error.
Also a subsequent clf or cla command could not solve the problem.
Has anyone of you an idea what is going on here (or what I'm doing
wrong)? My matplotlib version is 0.71-1.
best regards
Eugen Wintersberger
--
Eugen Wintersberger <eugen.wintersberger@...499...>