Hi

Working on my little experiment (backend with edition capabilities
https://github.com/fariza/MPL-Experimental-Backend)

I want to turn visibility on and off for lines.
I can not use the visible property, using it the autolimits "relim" keeps
considering the lines as being there.
As consequence the limits are wrong (if we think only on the visible lines).

So I resorted to remove the line from its axes by line.remove()

The question is:
If I do not want to use another variable to keep track of this line, how
can I find it again from the figure instance (or somewhere else)?
get_children gets me nowhere.... or maybe?

#################
import matplotlib.pylab as plt

fig = plt.figure()
ax = fig.add_subplot(111)
line = ax.plot(range(100))

print line[0] in ax.lines
line[0].remove()
print line[0] in ax.lines
plt.show()
#################


Thanks
Federico


-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to