PLVECT(3plplot)

πŸ’– PLVECT β€” vector plot, bestie πŸ’–

okay so this is a page from the PLplot API manual, and it's literally all about plvect. let's get into it πŸŽ€


✨ NAME ✨

plvect β€” Vector plot. that's it, that's the vibe. arrows. vectors. slay. πŸ¦‹


🌸 SYNOPSIS 🌸

plvect(u, v, nx, ny, scale, pltr, pltr_data)

like, that's the whole call. seven args. no cap. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

So plvect 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. πŸ“

Then there's a transformation routine, pointed to by pltr, with a pointer pltr_data for any additional data that transformation routine needs to map the indices within the matrices over to world coordinates. lowkey essential, honestly.

And the style of the vector arrow? that's a whole other function β€” you set it with plsvect(3plplot). πŸ’«

Redacted form (yes, "redacted", very mysterious of them): plvect(u, v, scale, pltr, pltr_data) β€” and per the discussion above, 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. fr fr, it depends.

This function is used in example 22. iconic behavior. 🌈


🫢 ARGUMENTS 🫢

  • u, v (PLFLT_MATRIX(3plplot), input) β€” a pair of matrices containing the x and y components of the vector data to be plotted. the duo. the main characters. 😭
  • nx, ny (PLINT(3plplot), input) β€” dimensions of the matrices u and v. know your size, bestie. πŸ“
  • scale (PLFLT(3plplot), input) β€” the parameter controlling the scaling factor of the vectors for plotting. and it's giving conditional logic, so listen up:
    • 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. periodt.
  • pltr (PLTRANSFORM_callback(3plplot), 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(3plplot) for the identity mapping, and pltr1(3plplot) and pltr2(3plplot) 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 the PLplot documentation for the details concerning how PLTRANSFORM_callback(3plplot) 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(3plplot); and pltr2(3plplot). Furthermore, some of our more sophisticated bindings (see, e.g., the PLplot documentation) 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. πŸ‘‘

ngl that was a lot but you ate that, keep reading. πŸ’œ

  • pltr_data (PLPointer(3plplot), input) β€” extra parameter to help pass information to pltr0(3plplot), pltr1(3plplot), pltr2(3plplot), or whatever callback routine that is externally supplied. the little messenger bag of the argument list. πŸŽ€

πŸ‘‘ AUTHORS πŸ‘‘

Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. legends, every single one. πŸ«ΆπŸ’–


πŸ” SEE ALSO πŸ”

PLplot documentation at http://plplot.sourceforge.net/documentation.php. go read it, iykyk. πŸ“šβœ¨


and that's the whole page, bestie πŸ¦‹ this was PLVECT from the PLplot API manual β€” which, yes, is also the exact title up at the top of the original, and the version stamp at the bottom said August, 2026 with PLVECT(3plplot) again, so. there you go. bye bye, go plot some vectors πŸ’…πŸŒΈβ­

πŸ“¦ where this page comes from