Skip to content

xticks

Ticks for the x-axis

xticks(ticks)

  • The argument ticks is a vector of tick numbers.
  • This switches to manual mode, and sets the tick values.
  • If ticks is empty, it will show no ticks.
  • ticks should not contain Inf and NaN values.

ticks = xticks

  • It returns current tick values.

xticks('auto')

  • It switches to auto mode, and ticks are generated automatically.

xticks('manual')

  • It switches to manual mode.

xticks('mode')

  • It returns the current mode, which is either 'auto' or 'manual'.

Note

  • If the hold state is off, execution of the next 'plot' or 'surf' function will reset it to auto mode; otherwise, the mode remains unchanged.
  • Touch interactions do not change the mode.
  • If it is in manual mode, touch interactions do not change the tick values; otherwise, tick values are generated automatically.