|
From: John H. <jd...@gm...> - 2007-03-07 14:48:24
|
On 3/6/07, Jouni K. Sepp=E4nen <jk...@ik...> wrote:
> kc1...@ya... writes:
> > How do I draw a line going from point A to point B on a figure (not
It probably makes more sense not to use Axes.plot at all, since the
line is not associated with an Axes
from matplotlib.lines import Line2D
from pylab import figure, show, nx
fig =3D figure()
line =3D Line2D([100,200,300,400,500], [100,400, 350, 200, 500],
linewidth=3D4, color=3D'green')
fig.lines.append(line)
show()
But this feature isn't used very much, and one thing that we are not
currently supporting (but should) is the zorder for Artists in the
Figure. So if you have an Axes in your plot and you want the line to
go over it, you'll need to do something like Jouni suggested so the
line will be drawn above the Axes.
|