labels = xticklabels()
xticklabels(labels)
xticklabels('auto')
xticklabels('manual')
m = xticklabels('mode')
xticklabels(ax, ...)
| Parameter | Description |
|---|---|
| labels | Cell array of character vectors or string array of x-axis tick labels. |
| 'auto' | Enable automatic x-tick labels. |
| 'manual' | Freeze the current x-tick labels. |
| 'mode' | Return the x-tick label mode. |
| ax | Target axes. Default is the current axes. |
| Parameter | Description |
|---|---|
| labels | Cell array of character vectors of x-axis tick labels. |
| m | 'auto' or 'manual'. |
xticklabels gets or sets the tick labels along the x-axis of the current axes.
Specifying labels switches the x-tick label mode to manual.
bar([10 20 30 41]);
xticks(1:4);
xticklabels({'A','B','C','D'});
labels = xticklabels()
| Version | Description |
|---|---|
| 2.0.0 | initial version |