> On Thu, Jun 19, 2008 at 3:37 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: >> I still do not see why a figure has a canvas as data.
On Thu, 19 Jun 2008, John Hunter apparently wrote: > This is just a convenience so the child can see the parent. If I have > a function that gets a line, I can do line.axes.figure.canvas and walk > backwards up the containment hierarchy to get what I need. This is > backwards because a canvas holds a figure which holds an axes which > holds a line, but everybody stores a reference to their parent. A > side effect of having so many cyclic references is that we cannot use > __del__ anywhere in the mpl class hierarchy since this breaks garbage > collection with cyclic references. Thanks for the explanation! Alan PS If anyone wants to share an example where it is useful to work "backwards" like that, I'm sure I would learn from it. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users