Xlim, ylim, and zlim set or query values of the axes object XLim, YLim, ZLim, and XLimMode, YLimMode, ZLimMode properties. When you do not specify an axes handle, these functions operate on the current axes. Performs the set or query on the axes identified by the first argument, axes_handle. Sets the respective axis limit mode to manual. Returns the current value of the axis limits mode, which can be either auto (the default) or manual. Sets the axis limits in the current axes to the specified values. With no arguments returns the respective limits of the current axes. Each operates on the respective x-, y-, or z-axis. Note that the syntax for each of these three functions is the same only the xlim function is used for simplicity.
Xlim, ylim, zlim (MATLAB Functions) MATLAB Function Reference