Enlarge figure axes by a given factor
Version 1.1.0 (2,79 ko) par
Jan Valdman
Given a figure with (eg. tight) axes, this simple code automatically recalculates and enlarges axes them by a prescribed factor.
5 examples (the code works in both normal and logarithmic scales):
figure; x=1:100; y=sqrt(x); plot(x,y); axis tight; enlarge_axis(0.1,0.05);
figure; x=1:100; y=sqrt(x); semilogy(x,y); axis tight; enlarge_axis(0.1,0.05);
figure; x=1:100; y=sqrt(x); semilogx(x,y); axis tight; enlarge_axis(0.1,0.05);
figure; x=1:100; y=sqrt(x); loglog(x,y); axis tight; enlarge_axis(0.1,0.05);
figure; sphere; axis image; enlarge_axis;
Citation pour cette source
Jan Valdman (2024). Enlarge figure axes by a given factor (https://www.mathworks.com/matlabcentral/fileexchange/79796-enlarge-figure-axes-by-a-given-factor), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R2020a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxTags
Remerciements
A inspiré : Path-following method for algebraic inclusions
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
enlarge_axis
Version | Publié le | Notes de version | |
---|---|---|---|
1.1.0 | Now it works in 3D as well. |
||
1.0.0 |