PLIMAGEFR(3plplot)

πŸ’– PLIMAGEFR πŸ’–

okay bestie, buckle up β€” this is the PLplot API page for plimagefr, and honestly? it's a whole vibe. it plots a 2D matrix using cmap1, and it's lowkey the main character of example 20. let's get into it 🫢


✨ NAME ✨

plimagefr β€” plot a 2D matrix using cmap1. that's the whole thing. icon behavior.


🌸 SYNOPSIS 🌸

plimagefr(idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin,
valuemax, pltr, pltr_data)

πŸ¦‹ DESCRIPTION πŸ¦‹

so like β€” plot a 2D matrix using cmap1. that's the job. πŸ’…

Redacted form, General: plimagefr(idata, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr, pltr_data)

and pssst β€” this function is used in example 20. so if you wanna see it living its best life, go look πŸ‘€


πŸŽ€ ARGUMENTS πŸŽ€

bestie, there are a lot of arguments here. we're gonna go through every single one, no skipping, fr fr.

  • idata (PLFLT_MATRIX(3plplot), input) β€” the matrix of values (intensities) you're plotting. it should have dimensions of nx by ny. that's the material. the moment. the data.
  • nx, ny (PLINT(3plplot), input) β€” the dimensions of idata. how big your matrix is, basically. know your size, queen.
  • xmin, xmax, ymin, ymax (PLFLT(3plplot), input) β€” these are explained in the pltr discussion below (scroll down, it's there πŸ’–). heads up though: these only matter for the special case when the callback function pltr is not supplied. so if you're passing a pltr, ngl, these are just sitting there vibing.
  • zmin, zmax (PLFLT(3plplot), input) β€” only data between zmin and zmax (inclusive) gets plotted. everything outside that range? not invited to the party. πŸ™ˆ
  • valuemin, valuemax (PLFLT(3plplot), input) β€” the minimum and maximum data values used for value-to-color mappings. the rules are:
    • a datum equal to or less than valuemin gets plotted with color 0.0
    • a datum equal to or greater than valuemax gets plotted with color 1.0
    • data between valuemin and valuemax maps linearly to colors in the range (0.0-1.0)

slay. it's giving gradient. 🌈

  • pltr (PLTRANSFORM_callback(3plplot), input) β€” a callback function that defines the transformation between the zero-based indices of the matrix idata and world coordinates.

if pltr is not supplied (like, set to NULL in the C case), then the x indices of idata get mapped to the range xmin through xmax, and the y indices of idata get mapped to the range ymin through ymax. that's the default behavior, and yes, that's where those xmin/xmax/ymin/ymax arguments finally earn their keep.

for the C case, transformation functions are provided right there in the PLplot library:

  • pltr0(3plplot) for the identity mapping
  • pltr1(3plplot) and pltr2(3plplot) for arbitrary mappings defined by vectors and matrices respectively

in addition, C callback routines for the transformation can be supplied by the user β€” like the mypltr function in examples/c/x09c.c, which provides a general linear transformation between index coordinates and world coordinates. iconic of it, honestly.

for languages other than C, you should consult the PLplot documentation for the details on how PLTRANSFORM_callback(3plplot) arguments are interfaced. but 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. yes, ALL of them. we been busy. 😭πŸ”₯

  • pltr_data (PLPointer(3plplot), input) β€” an extra parameter to help pass information to pltr0(3plplot), pltr1(3plplot), pltr2(3plplot), or whatever routine is externally supplied. it's the little messenger bag πŸŽ’ for your callback.

πŸ‘‘ AUTHORS πŸ‘‘

Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. legends, all of them. genuinely. πŸ’œ


⭐ SEE ALSO ⭐

PLplot documentation at http://plplot.sourceforge.net/documentation.php. go read it, bestie, it's good for you.


quick vibe check reminder: if pltr isn't supplied, those xmin/xmax/ymin/ymax arguments are doing the mapping for you. so don't pass NULL and then wonder why your indices look weird. πŸ’€

and that's the page!! 🌸 this was the PLplot API doc for plimagefr, dated August, 2026 β€” go plot something gorgeous with it. mwah πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from