CONTOURFS Procedure
Provides a wrapper which calls CONTOUR and CONTOURFILL that accepts all CONTOUR and CONTOURFILL keywords with the exceptions of Color_Index.
Additionally, CONTOURFS provides a method for plotting splined and filled contour plots that guarantees polygons will be drawn in a drawing order based on a non-splined contour plot.
 
note
CONTOURFS supersedes CONTOURFILL.
Usage
CONTOURFS, z [, x, y]
Input Parameters
z—A 2D data array used to generate the contours.
x—(optional) A vector or 2D array specifying the x-coordinates for the contour surface.
y—(optional) A vector or 2D array specifying the y-coordinates for the contour surface.
Keywords
CONTOURFS keywords let you control many aspects of the contour plot’s appearance. These keywords are listed in the following table. For a description, see Chapter 21: Graphics and Plotting Keywords.
 
 
note
CONTOURFS uses all keywords of CONTOUR and CONTOURFILL, as described in PV‑WAVE’s online help, with the exception of Col_Index. The keyword ‘Color_Index’ from CONTOURFILL was renamed ‘Col_Index’ to prevent ambiguity conflict with Contour’s Color keyword.
Discussion
If the x and y parameters are provided, the contour is plotted as a function of the X,Y locations specified by their contents. Otherwise, the contour is generated as a function of the array index of each element of z.
If x is a vector, each element of x specifies the x-coordinate for a column of z. For example, X(0) specifies the x-coordinate for Z(0, *). If the x parameter is a 2D array, each element of x specifies the x-coordinate of the corresponding point in z (xij specifies the x-coordinate for zij).
If y is a vector, each element of y specifies the y-coordinate for a row of z. If the y parameter is a 2D array, each element of y specifies the y-coordinate of the corresponding point in z (yij specifies the y-coordinate for zij).
CONTOURFS draws contours using one of two different methods:
*The first method, used by default, examines each array cell and draws all contours emanating from that cell before proceeding to the next cell. This method is efficient in terms of computer resources, but does not allow contour labeling.
*The second method searches for each contour line and then follows the line until it reaches a boundary or closes. This method gives better-looking results with dashed line styles, and allows contour labeling, but requires more computer time. It is used if any of the following keywords is specified: C_Annotation, C_Charsize, C_Charthick, C_Labels, Follow, Spline, or Path_Filename.
Although these two methods both draw correct contour maps, differences in their algorithms can cause small differences in the resulting graph.
Example
This example creates a filled contour plot of a 10 by 10 array of random numbers.
; Set up the color table
TEK_COLOR
; Create a 10-by-10 data array
cdata = RANDOMU(seed, 10, 10) 
; To create a filled contour plot, call CONTOURFS using
; the Path_Filename keyword
CONTOURFS, cdata, Path_file='path.dat', /XStyle, /YStyle, $
   NLevels=5, Col_Index=WoColorConvert([2, 3, 4, 5, 6, 7])
See Also