How to add an annotation "pointer" to a three-dimensional plot in MATLAB?

I want to add a "Pointer" to the 3D plot.
I want this "pointer" to point to a specific place on the sphere that I drew.
This pointer should not have an arrow, but it would be nice if that happened.

Thanks for any help!

+1
annotations matlab plot
source share
3 answers

Plain copy from MathWorks documentation. For more information, see this .

% Create a sphere and color it using a topographic colormap: cla reset; load topo; [xyz] = 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); 
+3
source share

Also be sure to check out the excellent ARROW presented at FEX by Eric Johnson (dated 2000, but updated in 2009).

screenshot http://www.mathworks.com/matlabcentral/fx_files/278/3/arrow_demo.png

+3
source share

And an easy way to add arrows, etc. - use Plot Tools. You can activate Plot Tools by clicking the right-most icon in the toolbar in the window containing the shape you drew. When you have the arrow as you want, you can generate the m file from the graph.

+2
source share

All Articles