2008/6/27 Angus McMorland <amcmorl@...287...>:
Hi all,
I sometimes find myself wanting to plot a series of lines using
axhline or axvline. Is there a mechanism to do this that I'm missing,
or would it be difficult to support the positional parameter being an
array of values at which to draw each line?
In fact, I see it does work... sort of. For me, with 0.91.2-2 (debian)
asking axhline throws up an error:
/usr/lib/python2.5/site-packages/matplotlib/pyplot.pyc in
axvline(*args, **kwargs)
1358 hold(h)
1359 try:
-> 1360 ret = gca().axvline(*args, **kwargs)
1361 draw_if_interactive()
1362 except:
/usr/lib/python2.5/site-packages/matplotlib/axes.pyc in axvline(self,
x, ymin, ymax, **kwargs)
2330
2331 trans = mtrans.blend_xy_sep_transform( self.transData,
self.transAxes )
-> 2332 l, = self.plot([x,x], [ymin,ymax] , transform=trans,
scaley=False, **kwargs)
2333 return l
2334
and doesn't immediately update the plot (which is what had me thinking
it wasn't working). The plot is, however, correctly updated when a
redraw is forced, such as uncovering the window after writing the
previous email.
···
Angus.
--
AJC McMorland, PhD candidate
Physiology, University of Auckland
(Nearly) post-doctoral research fellow
Neurobiology, University of Pittsburgh
--
AJC McMorland, PhD candidate
Physiology, University of Auckland
(Nearly) post-doctoral research fellow
Neurobiology, University of Pittsburgh