Create Magnified Plot of Rectangular ROI on Same Figure
This function magnifies a specified rectangular area [xlm, ylm]
in the current figure,and plots the magnified area on the same figure at axis defined by
position pos
Inputs:
xlm = 1x2 vector specifying limits of x-axis
ylm = 1x2 vector specifying limits of y-axis
pos = 4x1 vector specifying position of new axis
lwid = linewidth of lines in magnified plot
showAxisLabels = boolean to turn axis labels on/off
Example usage:
x = 0:10; y1 = x; y2 = 3 - 0.5*x;
figure;
plot(0:10,y1,'k--','linewidth',2); hold on;
plot(0:10,y2,'ko-','linewidth',2); hold on;
axis square;
xlm = [1.5,2.5];
ylm = [1.5,2.5];
pos = [.25 .6 .25 .25]; % pos = [x0, y0, xwidth, ywidth]
magnifyPlot(xlm,ylm,pos,2,false) % call function
(c) Rishabh Datta, 2021-02-12
引用
Rishabh Datta (2024). Create Magnified Plot of Rectangular ROI on Same Figure (https://www.mathworks.com/matlabcentral/fileexchange/87332-create-magnified-plot-of-rectangular-roi-on-same-figure), MATLAB Central File Exchange. 取得済み .
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxタグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!