plvect: Vector plot

`plvect`: Vector plot
Prev | Chapter 18. The Common API for PLplot | Next

#### `plvect`: Vector plot

`plvect (` | u ,
| v ,
| nx ,
| ny ,
| scale ,
| pltr ,
| pltr_data `)`;

Draws a plot of vector data contained in the matrices `(`u`[`nx`][`ny`],`v`[`nx`][`ny`])` . The scaling factor for the vectors is given by ``scale``. A transformation routine pointed to by ``pltr`` with a pointer ``pltr_data`` for additional data required by the transformation routine to map indices within the matrices to the world coordinates. The style of the vector arrow may be set using `plsvect`.

`u, v` (``PLFLT_MATRIX``, input)

  A pair of matrices containing the x and y components of the vector data to be plotted.

`nx, ny` (``PLINT``, input)

  Dimensions of the matrices ``u`` and ``v``.

`scale` (``PLFLT``, input)

  Parameter to control the scaling factor of the vectors for plotting. If ``scale` = 0` then the scaling factor is automatically calculated for the data. If ``scale` < 0` then the scaling factor is automatically calculated for the data and then multiplied by `-`scale`` . If ``scale` > 0` then the scaling factor is set to ``scale``.

`pltr` (``PLTRANSFORM_callback``, input)

  A callback function that defines the transformation between the zero-based indices of the matrices ``u`` and ``v`` and 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 Part III, “ Supported computer languages ” 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., Chapter 10, Fortran Language) support native language callbacks for handling index to world-coordinate transformations. Examples of these various approaches are given in `examples/<language>x09*`, `examples/<language>x16*`, `examples/<language>x20*`, `examples/<language>x21*`, and `examples/<language>x22*`, for all our supported languages.

`pltr_data` (``PLPointer``, input)

  Extra parameter to help pass information to `pltr0`, `pltr1`, `pltr2`, or whatever callback routine that is externally supplied.

Redacted form: `plvect(u, v, scale, pltr, pltr_data)` where (see above discussion) the `pltr, pltr_data` callback arguments are sometimes replaced by a `tr` vector with 6 elements, or `xg` and `yg` array arguments with either one or two dimensions.

This function is used in example 22.

Prev | Up | Next
`plvasp`: Specify viewport using aspect ratio only | Home | `plvpas`: Specify viewport using coordinates and aspect ratio