From: Eric F. <ef...@ha...> - 2007-11-20 17:15:52
|
John Hunter wrote: > On Nov 19, 2007 10:08 PM, Jeff Whitaker <js...@fa...> wrote: >> Bryan Fodness wrote: >>> I would like to use pcolor with the colors going from white (zero >>> values) to black (largest value). > >> pcolor(a, shading = 'flat', cmap=cm.binary) > > It may not be a binary map you want (that has just two colors) but a > reversed grayscale map which is continuous from white to black, in > which case you would use cmap=cm.gray_r Agreed, logically it should be cm.gray_r. But, surprisingly, cm.binary looks identical. Maybe cm.binary is not doing what you intended it to do? (I have always found LinearSegmentedColormap hard to understand, in spite of what seems to be abundant explanation in the docstrings.) Eric |