--- MITgcm_contrib/enderton/Diagnostics/DiagPlotMisc.m 2005/06/28 21:33:51 1.5 +++ MITgcm_contrib/enderton/Diagnostics/DiagPlotMisc.m 2005/08/10 19:58:03 1.6 @@ -5,6 +5,22 @@ % Apply desired colorbar, contour label, tick labels, box, grid % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Center caxis around 0 +if cmapcenter0 + caxis([-max(abs(caxis)),max(abs(caxis))]); +end + +% Apply desired colormap. +if ~isequal(cmap,'') + if isequal(cmap,'black') + colormap([0,0,0]); + elseif isequal(cmap,'bwr') + load('BWR_6.mat'); + colormap(bwr); + else + colormap(cmap); + end +end % Add colorbar, except for line plots. When the colorbar is placed, reset % the colorbar and axes positions on the figure to match desired settings.