|
From: John H. <jd...@gm...> - 2008-12-11 17:37:09
|
On Thu, Dec 11, 2008 at 10:19 AM, TP <par...@fr...> wrote:
> Hi,
>
> I use matplotlib 0.91.2.
> When I plot the same Line2D on two subplots, it disappears: execute the
> following script:
>
> #######################
> from pylab import *
> ion()
> f = figure()
> s = f.add_subplot("211")
> curve = matplotlib.lines.Line2D([0,1],[0,1],color='m')
> s.add_line( curve )
> s2 = f.add_subplot("212")
> draw()
> raw_input('press a key to delete a line to second subplot')
> s2.add_line( curve )
> s2.lines[-1].figure.canvas.draw()
> print s2.lines[-1].get_visible()
> raw_input('press a key to quit')
> #######################
>
> What is the reason for this behavior?
The lines get their transforms from the axes they reside in -- you
can't share a line on multiple axes
|