File Exchange

image thumbnail

Annotated cropping of data plots

version 1.0.0.0 (6.69 KB) by Kevin Bartlett
Makes a rectangular crop box in axes 1 with lines linking it to the corners of axes 2.

1 Download

Updated 04 Jan 2012

View License

With the same data plotted in two sets of axes, cropbox.m draws a box in the first axes to indicate the cropping limits specified by the user. The second axes is cropped to the specified limits and lines are drawn linking the corners of the cropping box to the corners of the cropped axes.

Lines are broken into multiple line segments at the points where they intersect with any axes bounding boxes in the figure. This allows the user to customise the line properties, making them invisible where they pass in front of a ylabel, for instance, or making them white where they pass in front of a dark image.

Cite As

Kevin Bartlett (2020). Annotated cropping of data plots (https://www.mathworks.com/matlabcentral/fileexchange/34450-annotated-cropping-of-data-plots), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!