xticks
Set or query x-axis tick values
Description
xticks(
sets
the x-axis tick values, which are the locations along
the x-axis where the tick marks appear. Specify ticks
)ticks
as
a vector of increasing values; for example, [0 2 4 6]
.
This command affects the current axes.
returns
the current x-axis tick values as a vector.xt
= xticks
xticks('auto')
sets an automatic mode,
enabling the axes to determine the x-axis tick
values. Use this option if you change the tick values and then want
to set them back to the default values.
xticks('manual')
sets a manual mode, freezing
the x-axis tick values at the current values.
Use this option if you want to retain the current tick values when
resizing the axes or adding new data to the axes.
returns
the current x-axis tick values mode, which is
either m
= xticks('mode')'auto'
or 'manual'
. By
default, the mode is automatic unless you specify tick values or change
the mode to manual.
Examples
Input Arguments
Output Arguments
More About
Algorithms
The xticks
function sets and queries several
axes properties related to the x-axis tick values.
Version History
Introduced in R2016b