@docstring.dedent_interpd
def inset_axes(parent_axes, width, height, loc=1, bbox_to_anchor=None, bbox_transform=None, axes_class=None, axes_kwargs=None, borderpad=0.5):
 if (axes_class is None):
  axes_class = HostAxes
 if (axes_kwargs is None):
  inset_axes = axes_class(parent_axes.figure, parent_axes.get_position())
 else:
  inset_axes = axes_class(parent_axes.figure, parent_axes.get_position(), **axes_kwargs)
 if (bbox_to_anchor is None):
  bbox_to_anchor = parent_axes.bbox
 axes_locator = AnchoredSizeLocator(bbox_to_anchor, width, height, loc=loc, bbox_transform=bbox_transform, borderpad=borderpad)
 inset_axes.set_axes_locator(axes_locator)
 _add_inset_axes(parent_axes, inset_axes)
 return inset_axes

@ docstring . dedent_interpd def inset_axes ( parent_axes , width , height , loc = 1 , bbox_to_anchor = None , bbox_transform = None , axes_class = None , axes_kwargs = None , borderpad = 0.5 ) : if ( axes_class is None ) : axes_class = HostAxes if ( axes_kwargs is None ) : inset_axes = axes_class ( parent_axes . figure , parent_axes . get_position ( ) ) else : inset_axes = axes_class ( parent_axes . figure , parent_axes . get_position ( ) , ** axes_kwargs ) if ( bbox_to_anchor is None ) : bbox_to_anchor = parent_axes . bbox axes_locator = AnchoredSizeLocator ( bbox_to_anchor , width , height , loc = loc , bbox_transform = bbox_transform , borderpad = borderpad ) inset_axes . set_axes_locator ( axes_locator ) _add_inset_axes ( parent_axes , inset_axes ) return inset_axes
create an inset axes with a given width and height .