ACON
Home/Topics |
Commands |
More Examples
ACON allows the user to contour x,y,z data values
to produce a contour plot showing contour isolines, or shaded
polygon contours. The data points are analyzed to form Delaunay
triangles.
The process of contouring your data as a shaded surface
requires some explanation. This program currently allows you to
read in a data file containing data points representing 3 variables
such as: longitude, latitude, and biomass; or any other parameters,
perhaps julian date, depth, and temperature. The actual kind of
data plotted is not really important, although this program does
have some facilities specifically directed towards the plotting
of geographic or spatial information. It is inappropriate to contour
discretely scaled variables (e.g. product number).
The process of contouring consists of: taking your
x, y values and determining the surface formed by joining each
point and interpolating the surface (the z values). While a number
of contouring packages use a gridded surface to interpolate the
response surface, this program uses a triangulated surface.
The process involves analyzing the spatial relationship
between the data points to form "natural triangles"
(as equilateral as possible) called "Delaunay triangles"
. The response surface is multi-faceted, where each facet is a
delaunay triangle formed between 3 data points.
This trianglulation methodology is not without its
problems. The delaunay triangles tend to form a reasonable surface,
although long narrow "sharp" triangles may be formed,
which connect data points which are topologically distant.
A second problem occurs when regularily gridded data
is triangulated. There are 2 distinct possible pairs of triangles
which may be formed by subdividing a rectangle into 2 subtriangles
(each diagonal creates a distinct case). This program is not capable
of using any anciliary information to determine which triangulation
is more appropriate.
Contouring gridded data will consistently
produce somewhat biased results.

/* This script demonstrates Shaded Contours*/
/* read the data file */
Matrix_Read(cat(HostPath(), "Test Data/TestData.txt"), "xyz",1,1 2 3);
/* The data has now been read into memory */
/* 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 data points and label them */
/*-----------------------------------------------------*/
/* draw the data points */
Draw_Text(mm(32),mm(192),"Shaded Contours");
/* Default contour method is Delaunay Triangles */
Contour_Method(0);
/* inverse distance weighted gradient interpolation */
Data_Interpolation(0,1.5);
/* 9 subtriangles within the delaunay triangles */
Data_Subtriangles(9);
/* grey level for each data level */
Data_Contour_Levels(15,0.8,20,0.6,25,0.4,30,.2);
/* show the data as a shaded contour plot */
Shade_Contours(xyz);
/* draw the data legend */
GreyScale_Legend(mm(92.00),mm(250.00));
/* draw the delaunay triangles on the plot */
Delaunay_Triangles(xyz);
/* set the line width */
Line_Width(pts(2.5));
/* draw the limits of the data set */
Data_Border(xyz);
/* reset line width 0.25 mm */
Line_Width(mm(0.25));
/* draw a section of the Nova Scotia coastline */
Overlay_file(mappath("COAST1"));
Overlay_file(mappath("Depthm200"));
ACON
Home/Topics |
Commands |
More Examples
|