hi all,
i am using mpl_toolkits.axes_grid.inset_locator.inset_axes to plot an
inset axes inside my figure, as follows:
inset = inset_axes(s,
width="30%", # width = 30% of parent_bbox
height=.5, # height : 1 inch
loc=4
)
i am trying to use the bbox_transform keyword argument to reposition
this within the figure -- i want to use figure coordinates rather than
the loc= keyword.
if i try the following:
inset = inset_axes(s,
width="30%", # width = 30% of parent_bbox
height=.5, # height : 1 inch
bbox_transform=(0.1, 0.1))
then i get the error:
File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/offsetbox.py",
line 910, in get_bbox_to_anchor
transform)
File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/transforms.py",
line 974, in __init__
assert isinstance(transform, Transform)
AssertionError
any idea how i can reposition the inset axes? thanks very much for your help.
*bbox_transform* expects a Transform instance.
ax = subplot(111)
ax2 = inset_axes(ax, width=3, height=2, loc=3,
bbox_to_anchor=(0.1, 0.1),
bbox_transform=ax.figure.transFigure)
Note that, bbox_to_anchor with a tuple of two numbers creates a bbox
with width=height=0, and something like width="30%" won't work.
Regards,
-JJ
···
i am using mpl_toolkits.axes_grid.inset_locator.inset_axes to plot an
inset axes inside my figure, as follows:
inset = inset_axes(s,
width="30%", # width = 30% of parent_bbox
height=.5, # height : 1 inch
loc=4
)
i am trying to use the bbox_transform keyword argument to reposition
this within the figure -- i want to use figure coordinates rather than
the loc= keyword.
if i try the following:
inset = inset_axes(s,
width="30%", # width = 30% of parent_bbox
height=.5, # height : 1 inch
bbox_transform=(0.1, 0.1))
then i get the error:
File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/offsetbox.py",
line 910, in get_bbox_to_anchor
transform)
File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/transforms.py",
line 974, in __init__
assert isinstance(transform, Transform)
AssertionError
any idea how i can reposition the inset axes? thanks very much for your help.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options