matlab进行地图仪的绘制

 1 % 绘制地球仪,并标出我们的位置
 2 cla reset;
 3 load topo;
 4 
 5 [x,y,z] = sphere(45);%45是画出来的球面的经纬分面数
 6 s = surface(x,y,z,'FaceColor','texturemap','CData',topo);
 7 colormap(topomap1);
 8 
 9 % Brighten the colormap for better annotation visibility:
10 brighten(.6)
11 
12 % Create and arrange the camera and lighting for better visibility:
13 campos([1.3239  -14.4250  8.4954]);
14 camlight;
15 lighting gouraud;
16 
17 axis off vis3d; %axis off关闭所有的坐标轴标签、刻度、背景
18 
19 % Set the x- and y-coordinates of the textarrow object:
20 x = [0.7698 0.5851];
21 y = [0.3593 0.5492];
22 % Create the textarrow object:
23 txtar =  annotation('textarrow',x,y,'String','We are here.','FontSize',14,'Color',[.9,0,0]);
24 
25 % control of visual
26 set(gcf,'Position',[100 50 600 500]) % [x_ori,y_ori,w,h], x_ori,y_ori以左下角为起点,向右为x,向上为y

 


 

posted @ 2015-10-18 14:25  wenglabs  阅读(583)  评论(0编辑  收藏  举报