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