On Fri, 11 Apr 2008, Eric Firing apparently wrote:
> It sounds like what you want is a listed colormap with direct indexing
> using a NoNorm() instance as the norm:
> cmap = mpl.colors.ListedColormap(['k', 'r', 'b'])
> norm = mpl.colors.NoNorm()
> matshow(aa, cmap=cmap, norm=norm, interpolation='nearest')
Perfect!
I actually had found ListedColormap in the docs.
It's name was very promising but the __init__ function had
no help. Can I suggest adding at least the following:
`colors` is a sequence of Matplotlib colors.
`name` is a string (a name assigned to this colormap).
Seems obvious in retrospect, but of course that's too late ...
By the way, how is the name attribute used?
Thanks,
Alan
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users