MATLAB: How to make a common color bar

color barcolormappcolorquiverwind

I want to make a common color bar for 4 subplots. Any suggestions would be appreciated.EVWS_matlab.png

Best Answer

This is how I do this neatly:
subplot(1,1,1)
cbh = colorbar_labeled('');
subplot(2,2,3)
plot([0 2])
subplot(2,2,2)
imagesc(peaks(123))
colorbar_labeled is an old function someone gifted me. This works very conveniently.
HTH