MATLAB: Do the axes get crashed when I create multiple subplots in a figure in MATLAB 7.0 (R14)

axescollapseheightMATLABsubplotthin

When I am stacking many axes on the same figure, as in the following example, the axes become much too narrow along the vertical direction to see the plots within them:
for i=1:12
subplot(12,1,i)
plot (sin(1:100)*10^(i-1))
end
In some cases, all the axes are reduced to horizontal lines. In other cases, the axes might not collapse, but vary in height. Also, Y-ticks and Y-labels are generally missing.

Best Answer

Subplot having multiple axes in the same figure behave this way by design in MATLAB 7.0 (R14) .
To work around this behavior, use the "align" option with the SUBPLOT function:
for i=1:12
subplot(12,1,i,'align')
plot (sin(1:100)*10^(i-1))
end