MATLAB: Do the subplots differ in size when each includes a y-axis label and a colorbar in MATLAB 7.0 (R14)

colorbarMATLABsize;smallsubplottooylabel

When I use the code:
for k=1:4
subplot(2,2,k)
colorbar
ylabel('my label')
end
The resulting subplots are not of the same size. Specifically, the subplots on the left are smaller than the subplots on the right.

Best Answer

This enhancement has been incorporated in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0 (R14) when using subplots with y-axis labels and colorbars.
In MATLAB 7.0.1 (R14SP1), you can work around this issue by changing the order of the code so that the y-axis label is created before the colorbar.
For example, instead of this code,
for k=1:4
subplot(2,2,k)
colorbar
ylabel('my label')
end
Use this code:
for k=1:4
subplot(2,2,k)
ylabel('my label');
colorbar
end
If you are using MATLAB 7.0 (R14), there are no known workarounds.