PLSLABELFUNC(3plplot)

πŸ’… NAME πŸ’…

plslabelfunc β€” the glow-up where you hand over a function of your own to make custom axis labels, bestie ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

plslabelfunc(label_func, label_data)

🌸 DESCRIPTION 🌸

Okay so picture this: the axes are being labelled, and instead of letting PLplot do its default lil thing, you get to be the main character πŸ‘‘. This function lets you supply your very own function that hands back the axis label text. Your function gets handed the numeric value of a point on an axis, and it returns a string label to match that value. It's giving "I'll handle the naming, thank you very much" πŸ’….

Wanna actually turn these custom labels on? Pass the appropriate arguments to plenv(3plplot), plbox(3plplot), plbox3(3plplot) and similar functions β€” that's the vibe check that flips it on πŸ”₯.

Also lowkey iconic: this function is used in example 19 πŸŽ€.

✨ ARGUMENTS ✨

  • label_func (PLLABEL_FUNC_callback(3plplot), input) β€” your custom label function, the whole star of the show. And bestie, real talk: if you ever wanna go back to the default labelling, just set this to NULL 🫢. The parameters your labelling function receives are, in order:
    1. axis β€” tells you which axis a label is being requested for. The value will be one of PL_X_AXIS, PL_Y_AXIS or PL_Z_AXIS 🧭
    2. value β€” the value along the axis that's being labelled, fr fr πŸ“
    3. label_text β€” the string representation of the label value ✍️
    4. length β€” the maximum length in characters allowed for label_text (respect the limit, no cap) 🚫
  • label_data (PLPointer(3plplot), input) β€” this one's for passing data through to your label_func function. lil messenger parameter, love that for you πŸ’Œ

🌈 AUTHORS 🌈

So many developers have contributed to PLplot over its long history β€” genuinely a whole squad β€” and they're all credited at http://plplot.sourceforge.net/credits.php πŸ‘‘πŸ’–

⭐ SEE ALSO ⭐

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


okay that's the whole page, slayed πŸ’…βœ¨ This one's from the PLplot API, dated August, 2026 β€” catch you on the next manpage, bestie, mwah πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from