ticks = xticks()
xticks(values)
xticks('auto')
xticks('manual')
m = xticks('mode')
xticks(ax, ...)
| Parameter | Description |
|---|---|
| values | Numeric vector of x-axis tick values. |
| 'auto' | Enable automatic x-tick selection. |
| 'manual' | Freeze the current x-tick values. |
| 'mode' | Return the x-tick mode. |
| ax | Target axes. Default is the current axes. |
| Parameter | Description |
|---|---|
| ticks | Numeric row vector of x-axis tick values. |
| m | 'auto' or 'manual'. |
xticks gets or sets the tick values along the x-axis of the current axes.
Specifying tick values switches the x-tick mode to manual.
x = linspace(0, 10, 50);
plot(x, sin(x));
xticks(0:2:10);
ticks = xticks()
| Version | Description |
|---|---|
| 2.0.0 | initial version |