image thumbnail

Spaceplots

version 1.5.0.0 (9.75 KB) by Aditya
Customize spaces between subplots in a figure

7.1K Downloads

Updated 03 Jun 2013

View License

Matlab's standard "subplot" function leaves large blank spaces around the plot boxes and gives the user no control over them. Spaceplots is an elementary function to get control over these spaces. I wanted to save space by making tight subplots, so I wrote this function. Thought it will be useful to others too.

>> Create your figure first, and then use spaceplots. It is a very non-intrusive function.

>> Works well with all subplot arrangements (including a mixture of large and small plots)

>> Preserves the axes line-up in the grid by manipulating insets properly

>> Does not work with multiple plots created in a figure by any function other than the Matlab default "subplot" function.

I hope the function is simple enough for anyone to rectify errors or make changes that suit them.

Cite As

Aditya (2021). Spaceplots (https://www.mathworks.com/matlabcentral/fileexchange/35464-spaceplots), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: subtightplot

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!