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

Data Points and Labels

Data Points and Labels Image

/* This script demonstrates drawing Data Points and Labels */
/*------------------------------------------------*/
/* Use a filled circle as the marker type */
Marker_Type(0);
/* Set the Marker Height */
Marker_Height(mm(2.0));
/* Set the character height */
Character_Height(pts(12));
/* Set the number of decimal digits to use when plotting numbers */
Decimal_Digits(0);
/*------------------------------------------------*/
/* Read the data from a file */
Matrix_Read(cat(HostPath(),"Test Data/TestData.txt"), "xyz");
/* The data has now been read into matrix named xyz */
/*------------------------------------------------*/
/* Now plot the data as data points and label them */
/* 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));
Draw_Text(mm(32),mm(192),"Data Points and Labels");
/* 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);
/* draw the data points */
Data_Points(xyz);
/* label the data points */
Data_Labels(xyz);
/* draw a section of the Nova Scotia coastline */
Overlay_file(mappath("COAST1"));
Overlay_file(mappath("Depthm200"));


AconIconACON       Home/Topics   |   Commands   |   More Examples



Last Modified : 2003-11-19