如何添加"指针"注释在MATLAB三维情节? [英] How to add a "pointer" annotation to a 3-D plot in MATLAB?

查看:121
本文介绍了如何添加"指针"注释在MATLAB三维情节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

欲一个指针添加到的3-D图。结果
我想这个指针在上我得出一个球一定当场点。结果
该指针不必有一个箭头,但如果它确实是好的。

I want to add a "Pointer" to a 3-D plot.
I want this "pointer" to point at a certain spot on a sphere that I have drawn.
This pointer does not have to have an arrowhead but would be nice if it did.

感谢您的帮助!

推荐答案

The MathWorks公司文档平原副本。欲知详情看看这个

Plain copy from The MathWorks documentation. For further details have a look at this.

% Create a sphere and color it using a topographic colormap:
cla reset;
load topo;
[x y z] = sphere(45);
s = surface(x,y,z,'FaceColor','texturemap','CData',topo);
colormap(topomap1);
% Brighten the colormap for better annotation visibility:
brighten(.6)
% Create and arrange the camera and lighting for better visibility:
campos([2 13 10]);
camlight;
lighting gouraud;
axis off vis3d;
% Set the x- and y-coordinates of the textarrow object:
x = [0.7698 0.5851];
y = [0.3593 0.5492];
% Create the textarrow object: 
txtar =  annotation('textarrow',x,y,'String','We are here.','FontSize',14);

这篇关于如何添加"指针"注释在MATLAB三维情节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆