Function: ax_limits

CALL:

limits = ax_limits(hax, mode, varargin)

DESCRIPTION:

Get limits for one or more x or y axes, limits are the lowest and highest value of all axes.

INPUT:

hax any
array of axes handles
mode any
string, possible value 'x' or 'y'
extend any
(optional) double extend limits to the left and right
default value 0.05
zero any
(optional) boolean, include zero
default value false
minspan any
(optional) double, minimum span of limits
 default value 0
include any
(optional) array of double, values to include within limits
 default value []

OUTPUT:

   limits: [min max]
 

EXAMPLE:

   limits = ax_limits(gca, 'x')