2010-09-16 17 views

Répondre

3

Copie simple à partir de la documentation de MathWorks. Pour plus de détails, jetez un oeil à 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); 
2

Et la manière la plus simple d'ajouter des flèches et autres est d'utiliser les outils de traçage. Vous pouvez activer les outils de traçage en cliquant sur l'icône la plus à droite dans la barre d'outils de la fenêtre contenant la figure que vous avez dessinée. Une fois que vous avez la flèche comme vous le souhaitez, vous pouvez générer le fichier m à partir du graphique.