You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
After setting xlim, it is sometimes useful to set ylim to range of the ydata within xlim. "axis tight" will set both xlim and ylim to the ranges of the full xdata and ydata.
setytight will leave xlim unaffected, and set ylim to the range of ydata within xlim.
For example:
plot(0:0.1:20,sin(0:0.1:20))
xlim([2 3])
setytight
setting xlim tight can be done with setxtight
Cite As
Bart van Oort (2026). setytight (https://www.mathworks.com/matlabcentral/fileexchange/40375-setytight), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (1.51 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
