Processing 2-dimensional data
2-dimensional data have independent x- and y-values, the dependent data dimension is the z-value.
An input file may contain any number of 2-dimensional data arrays,
limited only by the amount of computer memory available.
Data can be presented as a contour, cluster or scatter plot.
A data region can be selected in all three dimensions by specifiying the display parameters
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX.
Data blocks (H2:)
The data block header line must have on of the following forms:
H2: X = 10 TO 12 BY .2; Y = 0 TO 1 BY .1;
H2: (X = 10 TO 12 BY .2) (Y = 0 TO 1 BY .1) Z
The first one is inherited from the gd's predecessor package,
the second one allows to modify the data (z) dimension.
In either case the x- and y-dimension and hence the number of data is
determined by evaluation of the loop expression. If possible, the loops
should be built with integer expressions in order to avoid round-off problems.
The lines following the H2:-line are interpreted as the numerical data in free format.
Data are read line by line until the number of data specified in the header is satisfied.
A mismatch will cause an error message.
Data are interpreted according to the array mapping logic of the programming
languages PL/I and C, that is, the second dimension (y) increases faster
than the first one (x).
The axes may be interchanged:
H2: Y = 10 TO 12 BY .2; X = 0 TO 1 BY .1;
The original x-, y- and z-values may be modified:
H2: (X = 0 TO 1 BY .1)*0.2-100 (Y = 10 TO 12 BY .2) Z/100
means that the x-values are multiplied by 0.2 and then shifted by 100,
the z-values are divided by 100.
Both contour and cluster (scatter) plots are projections of cuts through the
z-component of the data onto the x-y-plane.
The number of cuts can be specified by the display parameter NCUT,
in this case the cut values are computed automatically.
Alternatively, the cut values may explicitly be specified by the display parameter CUTS:
CUTS(10 TO 100 BY 10)
Optionally, colours, linemode and the linewidth (in mm) may be given,
separated by a semicolon from the cut values.
They may be different for different cuts:
CUTS(10 TO 100 BY 10 ; rgD, 1)
CUTS(1,2,4,8,16 ; B, .5)
If multiple cuts are specified only the last one will be taken.
You use the command GDESCR to place cut descriptions wherever you desire.
The display parameter CONTOUR selects this mode of presentation.
When data are presented as a contour plot, z-cuts through the data are
projected onto the x-y-plane as lines. This implies some sort of linear interpolation.
Colour, linemode and linewidth are chosen by default or with the CUTS() parameter.
With cluster plots the data values are represented by coloured or monochrome rectangles,
centred at the (x,y)-value of the data point.
The size of the rectangles is proportional to the value of (z-zmin).
By default the linear dimensions of the cluster rectangles are scaled.
If the display parameter ZAREA is active, the areas
of the rectangles are proportional to the data values. With the display
parameter ZLOG active, the cluster sizes are
proportional to the log10(z/zmin)-values.
Three different cluster modes are available: monochrome and coloured clusters, and
additionally full clusters which do not differ in size. The different modes are selected with
the display parameter 2DCOL:
2DCOL(multi) multi-coloured clusters, same size, colour according to cut.
2DCOL(grey) multi-coloured clusters, same size, greyscale colours,
2DCOL(r) red clusters, size according to cut,
2DCOL(d) default colour (=black) clusters, size according to cut,
2DCOL(r,full) red, full area clusters
By default multi-coloured equal-sized clusters are drawn.
are similar to cluster plots, but use single points rather than
rectangular clusters. Useful for overlays (colourwash) since they
allow some transparency.
A polygon-shaped boundary can be defined to restrict the presentation of 2-dimensional
data to a certain region in the x-y-plane. This is sometimes useful to exclude areas
with "false" or "bad" data because it prevents the contour algorithm from interpolating
contours between "good" and "bad" regions of data.
You use the B-column of an extra 1-dimensional data block H: to define a boundary polygon:
H: X B,N0
The edges of the boundary polygon are exclusive.
Limited operations between data blocks with identical x- and y-coordinates
n2(a) (x=1,2,3) (y=5,6) z
3 4 5
6 7 8
n2(b) (x=1,2,3) (y=5,6) z
1 2 3
4 5 6
yields a 2-dim array with all 2's.