We call ``two dimensional data'' any data represented by a function f(X,Y). In practice, this representation may be regularly or randomly sampled. The first case corresponds to the Regular Grid array for which RG=f(I,J) and linear conversion formulae exist to convert between I and X and J and Y respectively. The second corresponds to triplets (X,Y,Z) stored in the corresponding buffers. Basic handling of 2-D data includes contouring, perspective view, bitmap processing, and extraction of one dimensional data.

Only regularly sampled 2-D data (i.e. a Regular Grid) can be conveniently
handled. The limits of a Regular Grid can be defined as the plot limits
using command `LIMITS /RGDATA`. In this case, GREG computes the
user coordinates corresponding to pixels 0.5 and NX+0.5 in X (same in Y)
and defines these values as the user coordinate limits. This means that the
Box will exactly cover the *Image* corresponding to the given map.

For randomly sampled data, GREG provides a way of interpolating them
on a Regular Grid by command `RANDOM_MAP`. All
other commands are provided to work exclusively on the Regular Grid array.
This includes :

- A general contouring facility using command
`RGMAP` - A simple perspective view using command
`PERSPECTIVE` - A bitmap display capability for X-Window terminals and PostScript
output, command
`PLOT` - A resampling facility either to produce finer contours, or to produce maps with the same sampling, and hence comparable pixel by pixel.
- Limited map analysis facilities : pixel value interrogation with
command
`DRAW VALUE`, statistics using command`MEAN`, masking part of a map using command`MASK`, computations of global and local extrema using command`EXTREMA`, strip extraction using command`STRIP`. For more general image processing facilities, the user is referred to the*GILDAS*documentation.

All these commands belong to the ``GREG2'' language.