antoutline

PURPOSE ^

ANTOUTLINE - script that read in outline of antarctica and display.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

ANTOUTLINE - script that read in outline of antarctica and display.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %ANTOUTLINE - script that read in outline of antarctica and display.
0002 
0003 xbounds=xlim;
0004 ybounds=xlim;
0005 
0006 x0=xbounds(1);x1=xbounds(2);
0007 y0=ybounds(1);y1=ybounds(2);
0008 
0009 
0010 %figure out where we want to put the outline.
0011 disp('Select south-west corner of outline image');
0012 [x,y]=ginput(1)
0013 
0014 position_axes=get(gca,'Position')
0015 position_outline=[position_axes(1)+(x-x0)/(x1-x0),position_axes(2)+(y-y0)/(y1-y0),.15,.15]
0016 load /proj/tpfimos/larour/Glaciology/Model_Data/Mosaic_Tiff/antarctica_outline
0017 outline_axes=axes('Position',position_outline);
0018 imagesc(outlinex,outliney,outline);set(outline_axes,'YDir','normal');
0019 set(outline_axes,'XTick',[]); set(outline_axes,'YTick',[]);
0020 set(outline_axes,'XTickLabel',[]); set(outline_axes,'YTickLabel',[]);
0021 
0022 hold on;
0023 
0024 %build box inside the continent
0025 for i=1:50,
0026     plot(x0:500:x1,(y0+500*i)*ones(length(x0:500:x1),1),'r');
0027     plot(x0:500:x1,(y1-500*i)*ones(length(x0:500:x1),1),'r');
0028     plot((x0+500*i)*ones(length(y0:500:y1),1),y0:500:y1,'r');
0029     plot((x1-500*i)*ones(length(y0:500:y1),1),y0:500:y1,'r');
0030 end
0031 %make border
0032 for i=1:50,
0033     plot(min(outlinex):500:max(outlinex),(min(outliney)+500*i)*ones(length(min(outlinex):500:max(outlinex)),1),'w');
0034     plot(min(outlinex):500:max(outlinex),(max(outliney)-500*i)*ones(length(min(outlinex):500:max(outlinex)),1),'w');
0035     plot((min(outlinex)+500*i)*ones(length(min(outliney):500:max(outliney)),1),min(outliney):500:max(outliney),'w');
0036     plot((max(outlinex)-500*i)*ones(length(min(outliney):500:max(outliney)),1),min(outliney):500:max(outliney),'w');
0037 end
0038

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003