MATLAB: Subplot axes shrink with colorbar

axescolorbarshrink

Hi, I do a subplot(2,2,…) with pcolor on each subplot and a colorbar for the plots on the right side. This subplot is repeated t times and an avi movie done with it. Unfortunately, for each new iteration the axes of the right side subplots and the colorbars shrink. If I remove the colorbar everything goes fine. This happens with Matlab 2011a. Workarounds for other axes shrinking bugs did not work and these were solved for previous releases. Thanks

Best Answer

You can set the 'Position' property of the axes after it resizes it to set it to whatever you want it to be.
set(handleToAxes, 'Position', [x, y, width, height]);