zoom Plot软件

Adds zoomed plot inset to current axes.

软件应用简介

zoom  Plot软件

Adds a zoomed plot inset to current axes, for use in highlighting a subarea of the current plot. 

[p,z] = zoomPlot(x,y,xbounds,pos,vertex) where: 

Inputs: 

x,y = vectors being plotted 

xbounds = [x1 x2] specifies the zoom indices, where x1 is the 

first x value displayed in the zoom plot and x2 is the last. 

pos = [left, bottom, width, height] specifies the location and 

size of the side of the zoom box, relative to the lower-left 

corner of the Figure window, in normalized units where (0,0) 

is the lower-left corner and (1.0,1.0) is the upper-right. 

vertex = toggles connecting lines corresponding to vertices, where 1 

corresponds to the top left vertex and continuing clockwise, 

4 corresponds to the bottom left vertex. Any/all 4 vertices can 

be included.

Outputs: 

p = axes handle for larger plot 

z = axes handle for zoom plot 

Note that the title, labels, and legend of the larger plot should be designated BEFORE placing the zoom plot. Otherwise, zoomPlot returns the handle of the original axes (p), and the title can be changed using “p.Title.String = title_string”, etc.

Example: 

% x and y data 

x = [0; 5; 10; 10.1; 10.25; 10.5; 11.34; 22.83; 43; 119; 257]; 

y = 2*exp(-1/8*x)+1/3*exp(-2*x)+0.2*rand(length(x),1); 

figure 

plot(x,y) 

hold on

% fit an exponential function to data 

f1 = fit(x,y,’exp2′); 

plot(f1)

% set major axes legend, title, and labels 

title(‘How far does the apple fall?’) 

xlabel(‘Distance from tree’) 

legend(‘Experimental Data’,’Multi-Exponential Fit’)

% zoomPlot to highlight a portion of the major plot 

[p,z] = zoomPlot(x,y,[5 50],[0.33 0.35 0.3 0.55],[1 3]); 

hold on 

plot(f1) 

legend hide

界面展示

zoom  Plot软件

结果示意

zoom  Plot软件

规格 价

0元试用
0.0元人民币/月

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年4月12日
下一篇 2022年4月12日

相关推荐