Hi JJ On Monday, 23 February 2009, Jae-Joon Lee wrote: > Here is my modification. > > Bbox = matplotlib.transforms.Bbox.from_bounds(.4, .1, .5, .3) > trans = ax.transAxes + fig.transFigure.inverted() > l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox, > trans).bounds > axins = fig.add_axes([l, b, w, h])
Thanks for this - works like a charm. My experience with transformations is very limited but I can see that they are very powerful... > > 3. Re-calculating [l, b, w, h] from tBbox seems cumbersome. Can > > the add_axes() not call a Bbox instance directly? > > Also see my modification. > I'm sorry but I don't understand what you mean by "add_axes() not > call a Bbox instance directly?". This has been answered by your modification - I wasn't aware of the .bounds attribute of a bounding box, which gives the required input to add_axes(). Thanks again Johann ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users