Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 14 Downloads (last 30 days) File Size: 5.14 KB File ID: #33159 Version: 1.0
image thumbnail




inse2DAbsolute creates an axes inset, defined using the larger axes, and corresponding annotations

| Watch this File

File Information

[ 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.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us