Skip to content

Commit

Permalink
Update normalize_colors routine and use it for LL and CS plots
Browse files Browse the repository at this point in the history
We have updated the normalize_colors routine so that it will place
the zero color at the appropriate place in the color scale.  For
difference plots (which use a symmetric colorscale), white will be
placed in the middle of the color scale (at 0.5).  For non-difference
plots, white will be placed at the start of the color scale (0.0).

This update fixes issue/17.  When vmin = vmax = 0, this zero, the code
would pass vmin = -0 and vmax = 0 to the pcolormesh function. This
apparently causes some issues, and e.g. some faces of the cubed-sphere
would show up as blue instead of white.

Other changes:
(1) Now explicitly import matplotlib.colors as mcolors
(2) Now explicitly import matplotlib.ticker as mticker

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Aug 26, 2019
1 parent f207929 commit 01b912c
Showing 1 changed file with 147 additions and 106 deletions.
Loading

0 comments on commit 01b912c

Please sign in to comment.