Four examples (the code works in both normal and logarithmic scales):
x=1:100; y=sqrt(x); figure; plot(x,y); enlarge_axis(0.1,0.05)
x=1:100; y=sqrt(x); figure; semilogy(x,y); enlarge_axis(0.1,0.05);
x=1:100; y=sqrt(x); figure; semilogx(x,y); enlarge_axis(0.1,0.05);
x=1:100; y=sqrt(x); figure; loglog(x,y); enlarge_axis(0.1,0.05);
Jan Valdman (2021). Enlarge figure axis by a given factor (https://www.mathworks.com/matlabcentral/fileexchange/79796-enlarge-figure-axis-by-a-given-factor), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.