Skip to content


Plot limits for the z-axis

zlim([a b])

  • It sets the lower and upper limits to a and b, respectively, and switches to manual mode.
  • a and b should be scalars with a < b.


  • It returns the current limits.


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


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


  • It switches to 'manual' mode.


  • If the hold state is off, execution of the next plot or surf function will reset it to auto mode. Otherwise, the mode and limits remain unchanged.
  • If there is no surface plot, execution of zlim will be ignored.
  • Touch interactions, such as pinch, 2-finger pan, 3-finger pan, and double tap, do not change the limits and mode.