pyiem.plot.colormaps module#

Definition of colormaps

pyiem.plot.colormaps.get_cmap(name)[source]#

Helper to workaround matplotlib complexity.

pyiem.plot.colormaps.stretch_cmap(cmap, bins, extend='both')[source]#

Return a cmap with appropriate over,under,bad settings.

The issue at hand is that default color ramps do not properly extend to cover over and under using values from the color ramp. That is desired behaviour of this library. If over,under,bad is already set, those settings are retained.

Parameters:
  • cmap (cm.ColorMap) – inbound colormap

  • bins (list) – values for binning

  • extend (str) – either ‘both’, ‘neither’, ‘min’, ‘max’ to control cbar

Retuns:

cm.ColorMap

pyiem.plot.colormaps.nwsprecip()[source]#

A color ramp used by NWS on NTP plots

Changes
  • modified the reds a bit to provide a larger gradient

  • added two light brown colors at the low end to allow for more levels

  • removed perhaps a bad orange color and remove top white color

pyiem.plot.colormaps.nwsice()[source]#

A Color Ramp Suggested by the NWS for Ice Accumulation.

pyiem.plot.colormaps.nwssnow()[source]#

A Color Ramp Suggested by the NWS for Snowfall

pyiem.plot.colormaps.dep_erosion()[source]#

DEP Erosion ramp yelllow to brown (jump at 5T) cool

pyiem.plot.colormaps.james2()[source]#

David James suggested color ramp Yellow to Brown

pyiem.plot.colormaps.james()[source]#

David James suggested color ramp Yellow to Blue

pyiem.plot.colormaps.whitebluegreenyellowred()[source]#

Rip off NCL’s WhiteBlueGreenYellowRed

pyiem.plot.colormaps.maue()[source]#

Pretty color ramp Dr Ryan Maue uses

pyiem.plot.colormaps.radar_ptype()[source]#

Generate a dictionary of colors for HRRR Ptype.

Return type:

dict[str, list]