rtickformat

Sets or queries the number format of the radial tick labels of polar axes.

Category: Graphics > 2-D and 3-D Plots

Syntax

rtickformat(fmt)

Formats the radial tick labels with the format fmt, such as '%.1f'.

f = rtickformat

Returns the current format.

Description

A format with a unit or fixed decimals makes tick labels self-explanatory. The function changes the RTickLabelFormat property of the current polar axes.

Input arguments

fmt
Text with a sprintf-style format that includes a conversion such as %g, plus any text to attach, for example '%g m'.

Output arguments

f
Current format text.

Example

Add a unit

polarplot(1:3, 1:3)
rtickformat('%g m')
rtickformat
Output
ans = '%g m'

See also

rticks rticklabels rtickangle sprintf