next up previous contents index
Next: plv: Plot a Vector Up: Output Primitives Previous: plm: Plot a Mesh   Contents   Index


plc: Plot Contours

Calling Sequence
...

plc(z[, y, x][, ireg][, <keylist>])

Description
Plot contours of z on the mesh y versus x. y, x, and ireg are as for plm. The z array must have the same shape as y and x. The function being contoured takes the value z at each point (x, y); that is, the z array is presumed to be point-centered. The y, x, and ireg arguments may all be omitted to default to the mesh set by the most recent plmesh call.

Keyword Arguments

The following keyword argument(s) apply only to this function.

levs = z_values
The levs keyword specifies a list of the values of z at which you want contour curves. The default is eight contours spanning the range of z.

triangle = triangle

Set the triangulation array for a contour plot. triangle must be the same shape as the ireg (region number) array, and the correspondence between mesh zones and indices is the same as for ireg. The triangulation array is used to resolve the ambiguity in saddle zones, in which the function z being contoured has two diagonally opposite corners high, and the other two corners low. The triangulation array element for a zone is 0 if the algorithm is to choose a triangulation, based on the curvature of the first contour to enter the zone. If zone (i, j) is to be triangulated from point (i-1, j-1) to point (i, j), then triangle(i, j)= 1, while if it is to be triangulated from (i-1, j) to (i, j-1), then triangle(i, j)=-1. Contours will never cross this ``triangulation line''.

You should rarely need to fiddle with the triangulation array; it is a hedge for dealing with pathological cases.

The following additional keyword arguments can be specified with this function. legend, hide, type, width, color, smooth, marks, marker, mspace, mphase, region

See ``Plot Function Keywords'' on page [*] for detailed descriptions of these keywords.

Examples
The following example gives a contour plot of the same mesh used in the preceding two examples. Calling plm with boundary = 1 and region = 1 plots the boundary of the mesh (which, by default, is one region); then calling plc plots a default number of contours (8).

fma() 
def mag(* args): 
   r = 0 
   for i in range(len(args)): 
      r = r + args[i]* args[i] 
   return sqrt(r) 
plm(region= 1, boundary= 1) 
plc (mag(x+. 5, y-. 5), marks= 1, region= 1) 
plm(inhibit= 3, boundary= 1, region= 1) 
plm(boundary= 1, region= 1)

6#6


next up previous contents index
Next: plv: Plot a Vector Up: Output Primitives Previous: plm: Plot a Mesh   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19