next up previous contents index
Next: plfp: Plot a List Up: Output Primitives Previous: plf: Plot a Filled   Contents   Index


plfc: Plot filled contours

Calling Sequence
...

plfc (z, y, x, ireg, contours = 20, colors = None, 
   region = 0, triangle = None, scale = "lin")

Description
Unlike the other plotting primitives, plfc is implemented in Python code. It calls a C module to compute the contours, then uses plfp (described in the next subsection) to draw the filled contour lines. It does not use the mesh plotting routines; hence the arguments z, y, x, and ireg must be given explicitly. They will not default to the values set by plmesh.

Keyword Arguments

The values given above for the keyword arguments are the defaults. The meanings of the keywords are as follows:

contours

If an integer, specifies the number of contour lines desired. The contour levels will be computed automatically. If an array of floats, specifies the actual contour levels.

colors

An array of unsigned char (Python typecode 'b') with values between 0 and 199 specifying the indices into the current palette of the fill colors to use. The size of this array (if present) must be one larger than the number of contours specified.

triangle

As described for the mesh plots. scale If the number of contours was given, this keyword specifies how they are to be computed: "lin" (linearly), "log" (logarithmically) and "normal" (based on the normal distribution; the minimum and maximum contours will be two standard deviations from the mean).

Example

In the following example, we have to explicitly compute and pass an ireg array. We plot filled contours and then plot contour lines on top of them. Note that the contour divisions do not coincide, since the two routines use different algorithms for computing contour levels. Perhaps someday this defect will be remedied.

ireg = ones (xx. shape, Int) 
ireg [0, :] = 0 
ireg [:, 0] = 0 
plfc(mag(x+. 5, y-. 5), yy, xx, ireg, contours= 8) 
plc (mag(x+. 5, y-. 5), marks= 1)

9#9


next up previous contents index
Next: plfp: Plot a List Up: Output Primitives Previous: plf: Plot a Filled   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19