--- MITgcm_contrib/enderton/Diagnostics/DiagPlotMisc.m 2005/06/28 21:33:51 1.5 +++ MITgcm_contrib/enderton/Diagnostics/DiagPlotMisc.m 2005/09/12 20:13:21 1.7 @@ -5,6 +5,24 @@ % 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,'solid-dashed') + % Accounted for in DiagPlotMakePlot. + elseif 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.