Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada
 
Français Contact Us Help Search Canada Site
Home What's New DFO National Site Map Media

Fisheries & Oceans
 
 
Maritimes Region
Fishing Industry
General Public
Marine & Oceans Industry
Media
Students and Teachers
Scientists and Researchers
 
AconIconACON       Home/Topics   |   Commands   |   More Examples

Stroked Arrows



Stroked Arrows

/* This script demonstrates Stroked Arrows*/
/*-----------------------------------------------------*/
/* longitude latitude limits of plot */
/* left, right, bottom, top */
Data_Window(-67,-62,41,44.0);
/* position on page of the axis border rectangle */
/* left, right, bottom, top */
Data_Viewport(mm(20),mm(90),mm(190),mm(260));
/* use mercator projection */
Data_Projection("MERCATOR"); /* draw axis, 1 deg labels, 0.5 deg tics, left and bottom edges */
Axis(1,1,0.5,0.5,1,0,1,0,0);
/*-----------------------------------------------------*/
/* Now plot the data as stroked arrows */
/* ----------------------------------------------------*/
/* plot_arrows - Plots arrows between start and end of each set */
Function plot_arrows(s)
{
xstart = num(substr(s,1,5));
xend = num(substr(s,15,5));
ystart = num(substr(s,6,5));
yend = num(substr(s,20,5));
if ((xstart != 0.0) && (xend != 0.0) && (ystart != 0.0) && (yend != 0.0)) then
{ arrow(xuser(xstart), yuser(ystart), xuser(xend), yuser(yend), pts(-4));
};
};
objstart("arrow"quot;);
/* read the data file */
Character_Read(cat(HostPath(), "Test Data/TestData.txt"), "char_data");
for(i=1;i<=len(char_data)[1];i++){ plot_arrows(char_data[i;]);};
objend("arrow");
/* draw a section of the Nova Scotia coastline */
Overlay_file(mappath("COAST1"));
Overlay_file(mappath("Depthm200"));
Draw_Text(mm(32),mm(192),"Stroked Arrows");

AconIconACON       Home/Topics   |   Commands   |   More Examples



Last Modified : 2003-11-19