Skip to content

xlim

Get or set x-axis limits.

xlim([xmin xmax])
xlim('auto')
lim = xlim

Sets or queries the x-axis limits of the active axes. Pass 'auto' to revert to automatic, 'manual' to freeze current, or a 2-element vector to set explicit limits.

xlim([0 100])
  • ylim — Get or set y-axis limits.
  • zlim — Get or set z-axis limits.
  • axis — Get or set axis limits and properties.