0001 function [handle_struct]=antscale(length,fontsize);
0002
0003
0004
0005
0006
0007 if ((nargin~=2) | (nargout~=1)),
0008 help antscale;
0009 return;
0010 end
0011
0012 disp('Position of scale');
0013 [x,y]=ginput(1);
0014
0015 A=[x-length/2 y+length/10];
0016 B=[x-length/2 y];
0017 C=[x-length/4 y];
0018 D=[x-length/4 y+length/10/4];
0019 E=[x y];
0020 F=[x y+length/10/2];
0021 G=[x+length/4 y];
0022 H=[x+length/4 y+length/10/4];
0023 I=[x+length/2 y];
0024 J=[x+length/2 y+length/10];
0025
0026 lines=[A;B;C;D;C;E;F;E;G;H;G;I;J];
0027
0028 h=line(lines(:,1),lines(:,2));
0029 set(h,'Color','k','LineWidth',1.5);
0030
0031 t1=text(x-length/2,y+1.5*length/10,'0');
0032 set(t1,'FontSize',fontsize,'HorizontalAlignment','center')
0033 t2=text(x,y+1.5*length/10,num2str(length/1000/2));
0034 set(t2,'FontSize',fontsize,'HorizontalAlignment','center')
0035 t3=text(x+length/2,y+1.5*length/10,[num2str(length/1000) ' km']);
0036 set(t3,'FontSize',fontsize,'HorizontalAlignment','center')
0037
0038 handle_struct(1).h=h;
0039 handle_struct(2).h=t1;
0040 handle_struct(3).h=t2;
0041 handle_struct(4).h=t3;
0042