setytight
Version 1.0.0.0 (1.51 KB) by
Bart van Oort
set ylim tight for the current values of xlim of a plot (xlim remains unchanged)
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 (2024). setytight (https://www.mathworks.com/matlabcentral/fileexchange/40375-setytight), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2012a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Startup and Shutdown in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |