| 5 | 
 %      Apply desired colorbar, contour label, tick labels, box, grid      % | 
 %      Apply desired colorbar, contour label, tick labels, box, grid      % | 
| 6 | 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 7 | 
  | 
  | 
| 8 | 
  | 
 % Center caxis around 0 | 
| 9 | 
  | 
 if cmapcenter0 | 
| 10 | 
  | 
     caxis([-max(abs(caxis)),max(abs(caxis))]); | 
| 11 | 
  | 
 end | 
| 12 | 
  | 
  | 
| 13 | 
  | 
 % Apply desired colormap. | 
| 14 | 
  | 
 if ~isequal(cmap,'') | 
| 15 | 
  | 
     if isequal(cmap,'black') | 
| 16 | 
  | 
         colormap([0,0,0]); | 
| 17 | 
  | 
     elseif isequal(cmap,'bwr') | 
| 18 | 
  | 
         load('BWR_6.mat'); | 
| 19 | 
  | 
         colormap(bwr); | 
| 20 | 
  | 
     else | 
| 21 | 
  | 
         colormap(cmap); | 
| 22 | 
  | 
     end | 
| 23 | 
  | 
 end | 
| 24 | 
  | 
  | 
| 25 | 
 % Add colorbar, except for line plots.  When the colorbar is placed, reset | 
 % Add colorbar, except for line plots.  When the colorbar is placed, reset | 
| 26 | 
 % the colorbar and axes positions on the figure to match desired settings. | 
 % the colorbar and axes positions on the figure to match desired settings. | 
| 86 | 
     m_proj('Equidistant Cylindrical','lat',90,'lon',[-180 180]); | 
     m_proj('Equidistant Cylindrical','lat',90,'lon',[-180 180]); | 
| 87 | 
     m_coast('color',[0 0 0]); | 
     m_coast('color',[0 0 0]); | 
| 88 | 
     %m_grid('box','on') | 
     %m_grid('box','on') | 
| 89 | 
  | 
     %draw_coast(1.) | 
| 90 | 
 end | 
 end |