Method cont
| Improve this Doc View Sourcecont(Double[,], Int32, Int32, Int32, Int32, Double[], TransformFunc)
plcont: Contour plot
Declaration
public static void cont(Double[, ] f, Int32 kx, Int32 lx, Int32 ky, Int32 ly, Double[] clevel, TransformFunc pltr)
Parameters
Type | Name | Description |
---|---|---|
Double[,] | f | A matrix containing data to be contoured. |
Int32 | kx | Start of x indices to consider |
Int32 | lx | End (exclusive) of x indices to consider |
Int32 | ky | Start of y indices to consider |
Int32 | ly | End (exclusive) of y indices to consider |
Double[] | clevel | A vector specifying the levels at which to draw contours. |
TransformFunc | pltr | A callback function that defines the transformation between the zero-based indices of the matrix f and the world coordinates.For the C case, transformation functions are provided in the PLplot library: pltr0 for the identity mapping, and pltr1 and pltr2 for arbitrary mappings respectively defined by vectors and matrices. In addition, C callback routines for the transformation can be supplied by the user such as the mypltr function in examples/c/x09c.c which provides a general linear transformation between index coordinates and world coordinates.For languages other than C you should consult for the details concerning how PLTRANSFORM_callback arguments are interfaced. However, in general, a particular pattern of callback-associated arguments such as a tr vector with 6 elements; xg and yg vectors; or xg and yg matrices are respectively interfaced to a linear-transformation routine similar to the above mypltr function; pltr1; and pltr2. Furthermore, some of our more sophisticated bindings (see, e.g., ) support native language callbacks for handling index to world-coordinate transformations. Examples of these various approaches are given in examples/ltlanguagegtx09*, examples/ltlanguagegtx16*, examples/ltlanguagegtx20*, examples/ltlanguagegtx21*, and examples/ltlanguagegtx22*, for all our supported languages. |
Remarks
Draws a contour plot of the data in f[nx][ny], using the nlevel contour levels specified by clevel. Only the region of the matrix from kx to lx and from ky to ly is plotted out where all these index ranges are interpreted as one-based for historical reasons. A transformation routine pointed to by pltr with a generic pointer pltr_data for additional data required by the transformation routine is used to map indices within the matrix to the world coordinates.