CONTOUR

 


Contour -- Graphical display of two-dimensional data


contour is used to display or plot contour maps of two-dimensional data, including cross sections through multi-dimensional data.

contour can generate graphical displays using X-Windows, or output suitable for generating hard-copy using HPGL or PostScript. When invoked without any command line arguments, contour uses X11 to display the data. The environment variable DISPLAY must be set in order for contour to work. If the display you are using is the workstation console, it should be set to unix:0, which is the default. If you are running the Toolkit on a remote computer, DISPLAY should be set to the host name of the display, e.g. mumin:0 or mumin.med.harvard.edu:0.

As with other programs in the Toolkit, multiple instances of contour can be invoked, all attached to the same (or different) shared memory sections. This is useful if you want to compare orthogonal cross sections of a multi-dimensional data set, or display one-dimensional traces through a data set (invoke contour and multiple instances of seepln).


Alphabetical list of commands



AUTOPLANE       FONT            RESET

BACKGROUND      GO              RULER

BORDER          GOTO            SHELL

CHARSIZE        GRID            SIZE

CLEAR           IMAG            SLOW

CLEVEL          LEVEL           STREAM

COLOR           LIMITS          TEXT

COM             LINETYPE        UNZOOM

CUBE            MOVE            WHERE

CURSOR          NEGATE          XTICK

DIM             ORIGIN          XTICKOFFSET

DRAW            PEAK            YTICK

EXIT            PLANE           YTICKOFFSET

FAST            PLANE CYCLE     ZOOM

FLUSH           REAL



Command-line features in Contour

HP7550A HPGLfile;l

HPGL plotter output. The device size is 17" by 11", the plot size is 20cm by 20cm, and the origin offset is 5cm by 5cm.


HPDRAFT HPGLfile;l [D or E]

HPGL plotter output. For 'D' format the device size is 34" by 2", the plot size is 45cm by 45cm, and the origin offset is 5cm by 5cm. For 'E' format (which is the default) the device size is 44" by 34", the plot size is 75cm by 75cm, and the origin offset is 8cm by 8cm.


PS PostScriptfile;l [P or L]

PostScript output. The device size is 11" by 8.5". The P or L literal selects between Portrait and Landscape mode; the default is Landscape. In either mode, the plot size is 15cm by 15cm and the origin offset is 4cm by 4cm.


PSL PostScriptfile;l [P or L]

PostScript output (legal size). The device size is 14" by 8.5". Otherwise this mode is the same as the previous one.


X [-geometry =[WxH][+X+Y]]

Interactive X11 windowed output. This is the default output device selection. However, note that if the standard X geometry argument is given, the X specifier must also be present. If it is not given, the window size is taken to be one-half the width and height of the screen.




Commands in Contour


AUTOPLANE [ON or OFF]

Turn autoplane mode on or off. When autoplane is on, the display is redrawn when each new plane is shown.


BACKGROUND [color-value;i or OFF]

Sets the current displayed plane with the current levels as the background image, to be drawn in the specified color whenever the plot is redrawn.


BORDER

Draw the border around the plot.


CHARSIZE x;f [y;f]

Specify the character horizontal and vertical sizes in cm. If the y-charsize is not given, it is taken to be the same as the x-charsize.


CLEAR

Clear the display. For plot file output, go to a new page.


CLEVEL color-value;i [NONE]
CLEVEL color-value;i NEG [color-value2;i]
CLEVEL color-value;i level-1;f [increment;f] ADD count;i
CLEVEL color-value;i level-1;f [increment;f] MUL count;i
CLEVEL color-value;i level-1;f ... level-n;f

Specify the levels for the contour plot for a specific color. The color-value numbers are as listed under COLOR. NONE clears the list of levels; NEG negates the levels.  If a second color is listed for NEG, the levels are taken as the negatives of the levels for that color.  The default increment is the initial level for ADD and sqrt(2) for MUL.


COLOR color-value;i


Select a new color or line style. The possible choices are:


Value                Color

0                        Tan

1                        White for X, Black for HPGL and PostScript

2                        Red

3                        Green

4                        Blue

5                        Yellow

6                        Magenta

7                        Cyan

8                        Black for X, White for HPGL and PostScript

Note: if the resulting output is printed on a black-and-white PostScript device, the colors will only show up as shades of gray. This color value is used for borders, tick marks, lines, text, and plot levels specified by the LEVEL command. Levels given in the CLEVEL command are not affected by this current color setting; they use their own colors.


COM ...

Arbitrary comment text.


CUBE [cube;{i or f} [R or I]]

Select a cube for display. See PLANE.


CURSOR color-value;i

Select a new cursor color (see COLOR). This command is only useful for interactive display.


DIM dom-1;l ... dom-n;l

Set the display order of the dimensions. Contour is inherently plane oriented, and this command specifies that dom-n is the row dimension, dom-(n-1) is the column dimension, and so on.


DRAW CM x;f y;f
DRAW x;f y;f [xoff;f yoff;f]

Draw a line from the current drawing location to the specified coordinates (see MOVE).


EXIT

Leave Contour or stop reading the current stream file.


FAST

Use the fast contour algorithm. It is suitable for display screens but not plotters or printers.


FLUSH

Flush the line output buffer for interactive DRAW commands.


FONT 'fontname' [pointsize;i]

Select a font for future TEXT commands. The font name must be in quotes and must be valid for the current output device. The pointsize argument duplicates (to some extent) the function of the CHARSIZE command, but the units are in points (1/72 in). Warning: errors in font names are not reported. For instance, using an incorrect font name for PostScript output will result in a PostScript error when the output file is printed.


GO

Draw the current plot. A lengthy plot can be aborted by pressing the Return key.


GOTO dom-1;l coord;{i or f} [R or I] ...

Specify the coordinates for display by dimension name. The coordinates can be in points (integer) or ppm (float). An optional R or I can be used to select the real or imaginary component in each dimension.


GRID [ON or OFF]

Enable or disable the drawing of entire grid lines when tick marks are displayed.


IMAG [REAL or IMAG]

Select the real or imaginary components along the dimensions being displayed. See REAL.


LEVEL [NONE or NEG]
LEVEL level-1;f [increment;f] ADD count;i
LEVEL level-1;f [increment;f] MUL count;i
LEVEL level-1;f ... level-n;f

Specify the levels for the contour plot, using the current color. NONE clears the list of levels; NEG negates the levels. The default increment is the initial level for ADD and sqrt(2) for MUL.


LIMITS [xlow;f xhigh;f ylow;f yhigh;f or xlow;i xhigh;i ylow;i yhigh;i]

Specify the limits for the display. Floating point numbers are taken as ppm values; integers are taken as indices.


LINETYPE type;i

Select a new line type. The possible choices are:


type                Line style

1                Thick solid line

2                Thick dotted line

3                Thick dashed line

4                Thick dot-dash line

5                Thin solid line

6                Thin dotted line

7                Thin dashed line

8                Thin dot-dash line

This command is only valid for PostScript output.


MOVE CM x;f y;f
MOVE x;f y;f [xoff;f yoff;f]

Set the drawing position to the specified coordinates in cm or ppm-intensity (with an optional offset in cm)


NEGATE [color-value;i]

Negate the current levels used for contour plotting. If a color number is specified, only the levels for that color are negated.


ORIGIN x;f y;f

Specify the plot origin in cm relative to the lower left corner of the page. For interactive windowed output the values are relative to the lower left corner of the window; but if the SIZE command has not been given (or specified a negative value) then the ORIGIN command is ignored and the plot always fills the entire window.


PEAK [x;f y;f or x;i y;i]

Enter interactive peak-picking mode. The initial cursor position can be specified, in points or ppm. The digits 4, 3, 2, 1 move the cursor in the negative direction by 1, 5, 10, 30 points; the digits 6, 7, 8, 9 move the cursor in the positive direction by 1, 5, 10, 30 points. Also, the mouse can be used to move the cursor directly.

Points can be flagged by striking an alphabetic key as follows:

X            Select the X axis as the current direction

Y            Select the Y axis as the current direction

B            Switch to a "box" cursor

L            Switch to a "line" cursor

R            Create a new ruler at the current position; see RULER (you must specify the type and
                       color)

O            Turn off the ruler under the cursor

PEAK mode is terminated by pressing RETURN or any control-key combination.


PLANE [plane;{i or f} [R or I]]

Select a plane for display. If plane is given, it is taken as a plane number (or ppm value). If plane is not given, the program interactively prompts for planes to display. Enter a plane number or ppm value, with an optional R or I (for the real or imaginary component in the plane dimension).


PLANE CYCLE plane1;{i or f} plane2;{i or f} ...

Interactively cycles among a set of planes. Type the F or Space key to go forward, the B key to go backward, or the Q key to quit.


REAL [REAL or IMAG]

Select the real or imaginary components along the dimensions being displayed. If both dimensions are complex, both components must be specified: the first refers to the Y axis dimension and the second to the X axis dimension. If only one dimension is complex, only that component need be given.


RESET

Resets the display parameters to show the entire plane, scaled to fit the window. It is no longer necessary to use this command to synchronize the NMR parameters with changes made in other programs.


RULER X x;{i or f} color-value;i
RULER Y y;{i or f} color-value;i
RULER XY x;{i or f} y;{i or f} color-value;i
RULER [number;i OFF]

Create a ruler of the specified type at the specified location with the specified color, or turn off an existing ruler. The confusing convention is that an X ruler is vertical, since the horizontal coordinate is fixed (and similarly, a Y ruler is horizontal).


SHELL 'Shell-command'

Spawns a sub-shell to execute the specified command (which must be surrounded by quotation marks).


SIZE x;f y;f

Specify the plot size in cm. For interactive windowed output, a negative number indicates the entire window should be used.

SLICE [X] [y;f or y;i]
SLICE Y [x;f or x;i]

Enter interactive slice mode.  A 1D cross section of the data set parallel to the X or Y axis is displayed.  The initial slice location can be specified, in points or ppm.  The mouse can be

used to move the slice directly.  Numeric keys can be used to move or scale the slice.  In scale mode (the default) the digits 1, 2, 3, 4 reduce the scale by factors of 30.5, 10.5, 5.5, 1.5; the digits 9, 8, 7, 6 expand the scale by the same amounts.  In move mode the digits 1, 2, 3, 4 move the slice in the negative direction by 30, 10, 5, 1 points; the digits 9, 8, 7, 6 move the slice in the positive direction by the same amounts.  The 5 key toggles between scale and move modes.


Commands can be entered by typing an alphabetic key as follows:

XOrient the slice parallel to the X axis

YOrient the slice parallel to the Y axis

SAutomatically rescale the slice

SLICE mode is terminated by pressing RETURN or any control-key combination.SIZE x;f y;f


Specify the plot size in cm. For interactive windowed output, a negative size indicates the entire window should be used.


SLOW

Use the slow contouring algorithm. This is suitable for plotters or printers and can also be used with a screen display.


STREAM filename;l

Read input from a disk file. Stream files may be nested 3 deep.


TEXT CM x;f y;f 'string'
TEXT x;f y;f [xoff;f yoff;f] 'string'

Draw a text string at the specified coordinates (see MOVE).


UNZOOM

Display the entire plane.


WHERE

Print the coordinate values of the plane currently being displayed.


XTICK [delta;f] [ON] [NOLABEL]
XTICK OFF

Draw X-axis tick marks. Delta is the spacing in ppm. If the spacing is not specified, the program will select a value that results in no more than about ten tick marks. The keyword ON indicates that tick marks should be produced on every plot. The keyword NOLABEL indicates that the marks should be drawn but not the axis legends.


XTICKOFFSET voffset;f [hoffset;f]

Specify the vertical and optionally the horizontal offset of the X axis tick numbers, in cm.


YTICK [delta;f] [ON] [NOLABEL]
YTICK OFF

Draw Y-axis tick marks. See XTICK.


YTICKOFFSET hoffset;f [voffset;f]

Specify the horizontal and optionally the vertical offset of the Y axis tick numbers, in cm.


ZOOM

Perform interactive rubber-band zooming.