rticklabels
Sets or queries the text of the radial tick labels of polar axes.
Category: Graphics > 2-D and 3-D Plots
Syntax
rticklabels(labels)
Sets the labels, one per radial tick.
L = rticklabels
Returns the current labels as a cell array.
Description
The labels replace the numbers on the radial axis, for example to show categories or units. Set the tick positions first with rticks, so each label lands where you intend.
Input arguments
labels- Cell array of character vectors or string array. If there are fewer labels than ticks, they repeat.
Output arguments
L- Cell array with one label per tick.
Example
Named levels
polarplot(1:3, 1:3)
rticks([1 2 3])
rticklabels({'low', 'mid', 'high'})
rticklabels
Output
ans = 3×1 cell
{'low' }
{'mid' }
{'high'}