inset2DAbsolute
[ 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.
Example:
% Generate and Plot Data
x = -10:.1:10;
y = sinc(x);
figure;plot(x,y);
% 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.
Cite As
James Hall (2024). inset2DAbsolute (https://www.mathworks.com/matlabcentral/fileexchange/33159-inset2dabsolute), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |