colorbrewer colormaps

i would like to add colorbrewer colormaps to matplotlib,
at least for my personal use, but i would like to do this
properly so that this can be used by others.

ColorBrewer:
http://www.personal.psu.edu/faculty/c/a/cab38/ColorBrewerBeta2.html

any hints on where to start? start with the cm.py module?
extend cm.py or create a stand-alone one?

the ColorBrewer palettes could be addressed by something
like one of the following, i guess?:

   cmap=cm.colorbrewer.PuBuGn
   cmap=colorbrewer.PuBuGn

the colorbrewer palettes are specified by 3 to 9 rgb colors,
each interpolated differently, how many of these points would
be preferred in a matplotlib module?

...or even all of them, assuming 5seq as a default
(when using the above):

   cmap=cm.colorbrewer.PuBuGn.3seq
   cmap=cm.colorbrewer.PuBuGn.9seq

Vidar Gundersen wrote:

i would like to add colorbrewer colormaps to matplotlib,
at least for my personal use, but i would like to do this
properly so that this can be used by others.

ColorBrewer:
http://www.personal.psu.edu/faculty/c/a/cab38/ColorBrewerBeta2.html

any hints on where to start? start with the cm.py module?
extend cm.py or create a stand-alone one?

the ColorBrewer palettes could be addressed by something
like one of the following, i guess?:

  cmap=cm.colorbrewer.PuBuGn
  cmap=colorbrewer.PuBuGn

the colorbrewer palettes are specified by 3 to 9 rgb colors,
each interpolated differently, how many of these points would
be preferred in a matplotlib module?

...or even all of them, assuming 5seq as a default
(when using the above):

  cmap=cm.colorbrewer.PuBuGn.3seq
  cmap=cm.colorbrewer.PuBuGn.9seq

Jim Boyle posted a nice example that shows how to do this a while back.

http://sourceforge.net/mailarchive/message.php?msg_id=11255878

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124