MATLAB: How to specify the default border width between axes generated by the SUBPLOT command in MATLAB 7.3 (R2006b)

MATLAB

I would like to be able to modify the default border width that is determined by the SUBPLOT command in MATLAB without having to re-position the axes.

Best Answer

The ability to specify the default border width between axes generated by the SUBPLOT command is not available in MATLAB.
To work around this issue, make a copy of the subplot.m file in the folder:
$MATLABROOT\toolbox\matlab\graph2d\
where $MATLABROOT is the output of executing the command 'matlabroot'.
You can then modify the offsets (line 108, as shown below) in the new file to your desired border widths.
% This is the percent offset from the subplot grid of the plotbox.
inset = [.2 .18 .04 .1]; % [left bottom right top]