On Thu, Jun 19, 2008 at 3:37 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On Thu, 19 Jun 2008, John Hunter apparently wrote:
>> This is covered somewhat in Chapter 10 of the user's guide
>> http://matplotlib.sourceforge.net/users_guide_0.98.0.pdf
>
> Your post was helpful.
> I still do not see why a figure has a canvas as data.
> I'll read that chapter.

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.

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

Reply via email to