On Thu, Dec 11, 2008 at 10:19 AM, TP <[EMAIL PROTECTED]> 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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to