---
name: "plslabelfunc"
section: "3plplot"
platform: "linux"
package: "plplot-doc"
version: "5.15.0+dfsg2-15"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/plslabelfunc"
---

# plslabelfunc(3plplot)

Assign a function to use for generating custom axis labels

## NAME

**plslabelfunc** - Assign a function to use for generating custom axis labels

## SYNOPSIS

**plslabelfunc**(*label\_func*, *label\_data*)

## DESCRIPTION

This function allows a user to provide their own function to provide axis label text.  The user function is given the numeric value for a point on an axis and returns a string label to correspond with that value.  Custom axis labels can be enabled by passing appropriate arguments to [**plenv**(3plplot)](/plenv/3plplot.md), [**plbox**(3plplot)](/plbox/3plplot.md), [**plbox3**(3plplot)](/plbox3/3plplot.md) and similar functions.

This function is used in example 19.

## ARGUMENTS

- *label\_func* (**PLLABEL\_FUNC\_callback**(3plplot), input)

  This is the custom label function.  In order to reset to the default labelling, set this to NULL. The labelling function parameters are, in order: .TP *axis* This indicates which axis a label is being requested for. The value will be one of PL\_X\_AXIS, PL\_Y\_AXIS or PL\_Z\_AXIS.

- *value*

  This is the value along the axis which is being labelled.

- *label\_text*

  The string representation of the label value.

- *length*

  The maximum length in characters allowed for label\_text.

- *label\_data* (**PLPointer**(3plplot), input)

  This parameter may be used to pass data to the label\_func function.

## AUTHORS

Many developers (who are credited at http://plplot.org/credits.php) have contributed to PLplot over its long history.

## SEE ALSO

PLplot documentation at http://plplot.org/documentation.php.
