Create Magnified Plot of Rectangular ROI on Same Figure

バージョン 1.0.1 (57.1 KB) 作成者: Rishabh Datta
This function magnifies a specified rectangular area in the current figure, and plots the magnified area on the same figure.
ダウンロード: 286
更新 2021/2/12

ライセンスの表示

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 リリースの互換性
作成: R2020b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

magnifyPlot

バージョン 公開済み リリース ノート
1.0.1

Added example figure

1.0.0