This command causes PLT contour a two dimensional array of data. The first number denotes the plot group to be contoured. If you have not defined any two dimensional plot groups, then PLT will automatically create a group for you that consists of the largest possible chunk of the main data array. If you omit the first number then PLT uses the group number from the last time you used the CONtour, IMAge, DGroup (to define a 2D array). If none of these commands were used, the PLT will use group 1.
A contour plot does not automatically turn off the normal plotting of the remaining plot groups, and typical arrays to be contoured may contains lots (hundreds!) of columns the possiblity that some of those groups will normally overwrite the contour is high. Thus you are advised to issue a
COlor OFf 1..999
to suppress the normal ploting, unless, of course you are a PLT wizard and want to mix the two types of plot.
If order for a contour to appear you must define a set of levels via the LEvel subcommand.
Yplot OFf 1..99 ! Turn off all previous plots DGroup 2 1 1 10 20 ! Define group 2 to be a 2D group WIN 1 ! Define the window to use LOC 0 0 0.5 0.5 ! Locate window in bottom left corner YPL 2 ! Plot group 2 in window 1 CON 2 LEvels -0.5 0 0.5 ! Create contours at three levels CON 2 LStyle 4 4 ! Use dotted lines for negative levels CON 2 LWidth,,3 ! Make the level=0 line fatter GAP 0.0 Nerr ! Best for contour plots R ! Reset the scale in this window DGroup 1 11 1 20 20 ! Define group 1 WIN 2 ! Define a second window YPL 1 ! Plot group 1 in window 2 LOC 0.5 0.5 1.0 1.0 ! :ocate window in upper right corner CON 1 LEvels -1.5 -0.5 0 0.5 1.5 CON 1 LWidth,,,3 ! Fatten up level=0 in this plot CON 1 LStyle 4 4 ! Use dotted lines for negative levels R ! Reset the scale in this window
GAp 0.0 Noerrors R ! reset the default scale.
The GAp 0.0 ensures that there is no extra gap around the data, and the Noerrors causes the error bars to be ignored when min/max values are computed. This causes the default scale to be set by the pixel centers.
It is possible to plot both a contour and an image in the same window. If the contour and image are both from the same group the PLT automatically plots the image first and then the contour "on top" of the image. If the contour and image correspond to different groups, then you should make sure the image is assigned a lower group number. This is because PLT plots the groups in order from the lowest to the highest.
CON Color 1 1 1 1 1 1 1 1 1 1
and to change just the third level to color index 3 use
CON Color,,,3
Note, you must use the CONtour LEv subcommand to define the levels before any contours will be plotted.
CON LEV -20 -10 0 10 20
would define 5 levels. PLT remembers the previous levels so you change the value for level 3 only by
CON LEV ,,,3.14159
To use fewer levels than what had been previously defined you must use the NO data value. Thus
CON LEV,,,,no
would leave the first 3 levels unchanged and stop plotting levels above 4.
CON LEV -10 -20 0 10 20 CON LS 4 4
Thus the first two contour levels would now be plotted with line style of 2 and the remainder would use the default line style.
Note, you must use the CONtour LEv subcommand to define the levels before any contours will be plotted.
CON LWidth,,,3
would plot the third level with a line width of 3.
Note, you must use the CONtour LEv subcommand to define the levels before any contours will be plotted.
CON 2 OFF
Of course, if you now want to see plot group 2 plotted as a regular Y vs X manner, make sure you use the COlor ON command, i.e., COL ON 2. Since group 2 is now a two dimensional array, you will now see the entire array was was being contoured projected onto the X coordinate. If you wish to restore group 2 to its original one dimensional form you should use "DGrroup 2 2", i.e., define group 2 to be the second vector in the main data array.