CONTOUR

Section: Local Commands (L)
Updated: 28 August 1990
Index Return to Main Contents
 

NAME

contour - contour plot program for X-windows, HP2648s and Postscript  

SYNOPSIS

contour [-o options-file] [-Pprinter] [-s scale] [-c level] [-e] [-g] [-j joinlevel] [-l] [-print] [-ps] [-old] contour-file  

DESCRIPTIONS

Contour is a program for drawing contour plots on X10/X11 windows or HP2648 terminals. The program will also produce a POSTSCRIPT plot which can be dumped out to an APPLE Laserwriter. Contour reads in data on a 3D surface from a contour-file and manipulates that data according to options specified either in the command-line or in a options-file. The program then draws contours on a screen or dumps the contours to a POSTSCRIPT file.

The 3D surface input data consists of z-values of the 3D surface, arranged on a rectangular grid of size (xmax - xmin) × (ymax - ymin). The data file format is shown below.

Data File Format (contour-file)

 xmin xmax ymin ymax 
 nxpts nypts
 z1
 z2
 ..
 ..
 ..

In the above, xmin, xmax, ymin and ymax are lower and upper bounds of the grid, and nxpts and nypts are the number of grid divisions in x and y.

Upon starting up the program, contour will read in the data stored in the contour-file and will then find the maximum and minimum z-values of the surface. It will then prompt for a contour step-size (i.e. the contour increments), and read in any plotting options specified either in the command line or in the options-file. The plot will then be drawn on the screen if possible. Finally, the user will be prompted as to whether or not the POSTSCRIPT plot is to be sent to a printer.  

OPTIONS

-o options-file
reads plotting options from the file options-file. Each option specification consists of a keyword and its corresponding value. The parser recognizes only a limited set of keywords; their values are either numbers, quoted strings, or the words "on" and "off". All the words in the option specification must be on the same line. The pound sign (#) indicates that the remainder of the line is a comment to be ignored by the parser.

List of Options (options-file)

xlabel "LABEL"         #[default = "X-AXIS"]           - for the x-label

ylabel "LABEL"         #[default = "Y-AXIS"]           - for the y-label

toplabel "LABEL"       #[default = "CONTOUR PLOT"]     - for the top-label

grid on/off            #[default = off]                        - draws a grid

equalscale on/off      #[default = on]                         - for equal x-y scaling

postscript on/off              #[default = on]                         - for postscript (PS) plot

printplot on/off               #[default = on]                         - send PS file to printer

printer "PRINTER"      #[default = $PRINTER]           - define the printer

contlabel on/off               #[default = on]                 - for contour labels

joinlevel high/low     #[default = --]                 - for joining curves

scale [0.1 - 1.0]              #[default = 1.00]               - scales the PS plot

linetypes [1 - 3]              #[default = 2]                  - no. of contour linetypes

xticks [1 - 20]                #[default = 4]                  - no. of x-divisions

yticks [1 - 20]                #[default = 4]                  - no. of y-divisions

-Pprinter
specifies which printer to which to send the postscript plot. The current default sets the printer name to the environment variable $PRINTER. If this variable is not set, then the printer used is the lp550M printer in 550M Cory.
-s scale
sets a scale factor. This is used only for POSTSCRIPT plotting.
-c level
forces the program to compute the contours at a single value of z, specified by level. The contours will be written to the file image.cont. The output data is organized in SAMPLE plot format, i.e.,

Single contour (image.cont)

 xmin, xmax, ymin, ymax
 ncurves
 npts
 pt1.x pt1.y
 pt2.x pt2.y
 ..
 ..
 ..
 npts
 pt1.x pt1.y
 ..
 ..
-e
expands the data into a triangular mesh. The mesh is stored in contour-file.3D. Thus, if the initial contour file is named im.cont, then the surface mesh will be stored in im.cont.3D.
-g
forces a grid to be drawn.
-j joinlevel
causes contour curves to be joined where possible. This is done by defining a boundary layer around the rectangular border, and setting the z-value of that boundary layer at either the maximum or minimum z-value. joinlevel = HIGH or high sets the border z-value to its maximum value: this is useful for plots which have high average z-values. joinlevel = LOW or low sets the border z-value to its minimum value: this is useful for plots which have low average z-values.
-l
suppresses the contour labels.
-print
sends the POSTSCRIPT lot to the printer automatically.
-ps
turns off the postscript plotting mode.
-old
accepts an older contour format for the contour-file, based on a rectangular 50 × 50 array. The data file format is similar to that described earlier except for the first 3 lines. nxpts and nypts (both equal to 50) are omitted. Also, xmin and ymin are the coordinates of the lower left corner of the grid while xlength and ylength define the area being examined.

Old Data File Format (contour-file)

 xmin ymin xlength ylength
 z1
 z2
 ..
 ..
 ..
host:display
opens a window on the given host and display
-d host:display
=geom
-rv
-bw border-width
-bd color
-fg color
-bg color
-fn font-name
sets input options for the X-window system.
 

AUTHOR

Kenny K.H. Toh (ktoh@mascot.berkeley.edu)  

FILES

dataplot.ps    temporary POSTSCRIPT file

image.cont     file produced by -c level option
 

SEE ALSO

SPLAT, drawplot(L), pdraw(L)


 

Index

NAME
SYNOPSIS
DESCRIPTIONS
OPTIONS
AUTHOR
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:22:15 GMT, January 05, 2023