[ insetAxesHandle rectHandle rectHandleInset annHandles] = inset2DAbsolute(axesHandle, insetLoc, style, rectLoc, varargin)
inset2DAbsolute creates a new axes located within the specified axes (identified by axesHandle) along with corresponding rectangle/lines/arrows as indicated by style. The axes location is defined using coordinates within axesHandle, rather than percentages of the figure.
If 'ZOOMN' or 'ARROW' are selected for the style variable, rectangles are added to both the inset and parent axes to identify the data and the inset is automatically populated with the appropriate data. If only an inset is desired, simply leave style undefined or set to .
Handles are returned so that the insets, rectangles, and annotations (lines/arrows) can be customized.
% Generate and Plot Data
x = -10:.1:10;
y = sinc(x);
% Define input arguments and create inset
insetLoc = [2 8;.4 .8];
style = 'ARROW';
rectLoc = [6 8;-.1 .1];
inset2DAbsolute(gca,insetLoc,style,rectLoc,'Color',[0 0 0],'LineWidth',2);
CAVEAT: Although the inset data is correctly mapped and appears to be correctly color-coded, the "RGB" values that are obtained from a data cursor are incorrect.