lims = xlim()
xlim([xmin, xmax])
xlim('auto')
xlim('manual')
m = xlim('mode')
xlim(ax, ...)
| Parameter | Description |
|---|---|
| [xmin, xmax] | x-coordinates: vector or matrix. |
| 'auto' | enable automatic limit selection. |
| 'manual' | freeze the x-axis limits at their current value. |
| 'mode' | returns the current x-axis limits mode. |
| ax | a scalar graphics object value: parent container, specified as a axes. |
| Parameter | Description |
|---|---|
| lims | two-element vector: [xmin, xmax] |
| m | 'auto' or 'manual'. |
xlim get or set the limits of the x-axis for the current plot.
x = linspace(-1, 1);
y = sin(2*pi*x);
plot(x, y);
lim = xlim()
m = xlim('mode')
| Version | Description |
|---|---|
| 1.0.0 | initial version |