From: Thomas R. <tho...@gm...> - 2009-04-30 01:17:51
|
Thanks! Is there an easy way to keep a reference to patches? I notice that for example p = ax.add_patch(Circle((0.5,0.5),radius=0.5)) does not work (p is not a reference to the patch). Is there a way to keep a reference so I can update the properties of the patch at a later time? Cheers, Thomas On 29 Apr 2009, at 21:13, Eric Firing wrote: > Thomas Robitaille wrote: >> Hi, >> Is there an easy way to draw a patch or a patchcollection such that >> it always stays at the same relative position in a set of axes, >> rather than at the same pixel position? So for example, I would >> want to plot it at (0.1,0.1) relative to the axes, and if I zoom >> in I would still want it to stay at (0.1,0.1) > > With ipython -pylab: > > ax = gca() > ax.fill([0.1, 0.2, 0.15], [0.1, 0.1, 0.15], transform=ax.transAxes) > draw() > > then pan, zoom at will. > > Eric > |