Currently only PyGist supports Regions.
Region objects are used to specify graphing modes for some or all of the regions in a QuadMesh plot. As we shall show in the examples later in this section, subsets of the regions in a QuadMesh can be selected for plotting, and different regions can be plotted with different keyword options. The QuadMesh keyword regions is used to specify a list of Region objects to a QuadMesh. If such a list of Region objects is given, then only those regions on the list will be plotted, even though the QuadMesh may contain others.
The keywords arguments recognized are:
Note that there are no keywords for specifying the mesh itself. Regions are never plotted unless they belong to an already-defined QuadMesh, which has all the necessary information.
Region, like other 2d classes, also has the methods set and new.
The keyword arguments for Region object instantiation are as follows:
number = <positive integer>: the number of the Region being specified.must correspond to one or more entries in the ireg array of the QuadMesh to which this Region belongs.
boundary = 0/1--0: plot portion of mesh for the selected region; 1: plot only the boundary of the selected region.
boundary_type, boundary_color: these matter only if boundary = 1, and tell how the boundary will be plotted and what its color will be.
inhibit = 0/1/2--0: plot both sets of mesh lines; 1: do not plot the (x [:, j], y [, j]) lines; 2: do not plot the (x [i,:], y[i,:]) lines; 3: if boundary = 1, do not plot the boundary (default 0). Only applies if edges = 1.
levels = either:
(1) optional one-dimensional sequence of floating point values. If present, a list of the values of z at which you want contours; or
(2) a single integer specifying the number of contours, in which case the graphics will compute the contour levels.
filled = 0/1--If 1, plot a filled mesh using the values of z if contours = 0, or plot filled contours if contours = 1 (this option is not available at the time of writing of this manual, but will be added soon). If z is not present, the mesh zones will be filled with the background color, which allows plotting of a wire frame. (default value: 0.)
contours = 0/1--if 1, contours will be plotted if filled = 0, and filled contours will be plotted if filled = 1 (this option is not available at the time of writing of this manual, but will be added soon). contours normally defaults to 0, but will default to 1 if edges = 0, filled = 0, and vectors = 0 on the theory that you must want to plot something.
The user should Table 3, "filled and contours," on page 23 to understand how these last two parameters relate.
z_scale = "lin" (default), "log", or "normal" specifies how the contours are to be computed.
vectors = 0/1--This keyword is only meaningful if the QuadMesh containing this Region has the vectors vx and vy defined. If 0, the vectors defined on this Region will not be plotted; if 1, they will be. (default: 1)
edges, if nonzero when filled = 1, draw a solid edge around each zone, as controlled by keyword inhibit. ewidth and ecolor may also be used.
type, color, width, label, hide, marks, marker as for
QuadMesh. Remember that a marker specified for a contour plot represents the first of a consecutive series of markers for the contours.
Methods new and set are as in the Curve and QuadMesh classes. Remember to beware of setting conflicting values for keywords with set.
The following examples illustrate (on the same mesh as before) how you can plot the regions of the mesh in differing styles. Study the code and comments carefully, and run the examples yourself.