add_DataTips_2D

版本 1.0.4 (479.3 KB) 作者: Massimo Ciacci
Creates multiple data tips on surface objects of active figure.
24.0 次下载
更新时间 2021/4/23

查看许可证

ADD_DATATIPS_2D( x_values , x_values, [fontSize, nxy,nz, matchBckgnd, Alpha])
Creates multiple data tips on all surface handles of gcf.

Tips are created at location (xi,yi), fn(xi,yi) where
xi = x_values, yi = y_values,
fn(xi,yi) = defined by (XData,YData,ZData) in current surface plot

OPTIONS, descriptive
------
matchBckgnd: Data tip background can be optionally matched in color to that of each surface at the location of the data tip.
nxy,nz : Data tip accuracy in nr of digits for xy and z. 0 means skip.
Alpha : Data tip Transparency.

INPUTS, detailed:
------
x_values = array of x value where data tips are requested
y_values = array of y value where data tips are requested
fontSize = self explanatory
nxy,nz = nr of digits used for representation x,y,z
set nxy=0 if you only want to display z value
set nz=0 if you only want to display x value
matchBckgnd = (0,1,2) specifies if DataTip bckgnd should be same color as surface @ that point
0 : fixed background light
1 : match color of surf @ point of data tip
2 : match color of surf @ point of data tip, brighter

Alpha = Data tip Transparency

EXAMPLE:
figure();
[X,Y,Z] = peaks(25);
surf(X,Y,Z); axis tight; xlabel('x');ylabel('y')
[~,idxM]=max(Z(:)); [~,idxm]=min(Z(:));
[iyM,ixM] = ind2sub(size(Z),idxM);
[iym,ixm] = ind2sub(size(Z),idxm);
x1 = X(1,ixM); x2=X(1,ixm);
y1 = Y(iyM,1); y2=Y(iym,1);
xV = [x1,x2];
yV = [y1,y2];

[h_Dtip_out, zVals] = add_DataTips_2D(xV,yV)
%[h_Dtip_out, zVals] = add_DataTips_2D(xV,yV,14, 0,5, 0);

M.Ciacci, 2021/04/21, rev1.0

引用格式

Massimo Ciacci (2024). add_DataTips_2D (https://www.mathworks.com/matlabcentral/fileexchange/90845-add_datatips_2d), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签
致谢

参考作品: add_DataTips

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.4

smaller screenshot

1.0.3

Fixed outdated comments and warnings that related to add_DataTips (the 1D version)

1.0.2

Wrong name

1.0.1

screenshot

1.0.0