From: Jae-Joon L. <lee...@gm...> - 2009-10-26 17:09:00
|
On Sun, Oct 25, 2009 at 7:30 PM, George Nurser <gn...@go...> wrote: > it seems a pity that > fig.add_axes can't accept the transform directly. While this is certainly possible, but it is a bit tricky to get it correct due to the underlying design of the matplotlib. On the other hand, I think it solves some problems, but not all. And the axes_locator attribute in the current matplotlib is an attempt for a more general solution. For example, what you want can be achieved with something like below. from mpl_toolkits.axes_grid.inset_locator import InsetPosition ax= subplot(111) ax2=axes([0, 0, 0, 0]) # The initial value is ignored in this example ax2.set_axes_locator(InsetPosition(ax, [0.2, 0.2, 0.4, 0.4])) Regards, -JJ |