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.
setting xlim tight can be done with setxtight
Bart van Oort (2021). setytight (https://www.mathworks.com/matlabcentral/fileexchange/40375-setytight), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!