plslabelfunc: Assign a function to use for generating custom axis labels

`plslabelfunc`: Assign a function to use for generating custom axis labels
Prev | Chapter 18. The Common API for PLplot | Next

#### `plslabelfunc`: Assign a function to use for generating custom axis labels

`plslabelfunc (` | label_func,
| label_data`)`;

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`, `plbox`, `plbox3` and similar functions.

`label_func` (`void (*) (PLINT, PLFLT, char *, PLINT, PLPointer)`, 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:

  `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`, input)

  This parameter may be used to pass data to the `label_func` function.

This function is used in example 19.

Prev | Up | Next
`plshade1`: Shade individual region on the basis of value | Home | `plsmaj`: Set length of major ticks