|
From: Eric F. <ef...@ha...> - 2012-09-07 07:28:08
|
On 2012/09/06 9:03 PM, Phil Elson wrote: > This seems to a be common misconception... > > I guess in future, we could add a check to the add_patch method to see > if the given artist already has an associated Axes, and if it does, emit > a warning. It's not just patches; but I think a single warning in Artist.add_axes would do it, perhaps at the cost of generating an unnecessary warning for some legitimate use case. Eric > > > > On 7 September 2012 07:42, Eric Firing <ef...@ha... > <mailto:ef...@ha...>> wrote: > > On 2012/09/06 8:35 PM, jonasr wrote: > > That seems to work, thank you. > > > > I would have thought that the add_patch function creates two seperate > > objects independent of the defined Rectangle. > > add_patch doesn't create any objects; it just attaches the axes to the > patch in both directions: a reference to the patch object is appended to > a list of axes artists, and the patch object gets a reference to the > axes. Fortunately, python has garbage collection to handle such > circular references. > > Eric > > > > > greets jonas > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |