« Return to Thread: where is line after remove?

Re: where is line after remove?

by Federico Ariza-2 :: Rate this Message:

| View in Thread

Hi

That is exactly what I am doing, but I thought it was kept somewhere.

I like the idea of upstream modification of relim.

Thanks
Federico

On Tue, Mar 13, 2012 at 2:13 PM, Goyo <goyodiaz@...> wrote:
El día 13 de marzo de 2012 00:25, Federico Ariza
<ariza.federico@...> escribió:
> [...]
> 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).

I faced this some time ago and my workaround was writing my own
(simplified) version of relim, if memory serves. But this may not fit
your needs here. Maybe a better solution is modify relim upstream so
it can take visibility into account (maybe using a new keyword). Just
a quick thought.

> 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?

I don't think matplotlib keeps a reference to a line object after you
remove it from the axes. If I'm right and you want to follow that path
you'll need to track it yourself.

Regards

Goyo



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

-- Antonio Alducin --

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
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-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 « Return to Thread: where is line after remove?