On 04/20/2010 01:06 PM, Ryan May wrote: > On Tue, Apr 20, 2010 at 11:40 AM, Jim Vickroy <jim.vick...@noaa.gov> wrote: >> Nikolaus Rath wrote: >> >> Hello, >> >> Maybe my googling skills are deficient, but I wasn't able to find any >> information on how to define my own colormap. >> >> Can someone give me a pointer, or a basic example how to create a simple >> map that e.g. maps -1 to Red, 0 to White, and 1 to Blue? >> >> http://lmgtfy.com/?q=matplotlib+colormaps > > That was a tad harsh, given that the first page of google results > didn't really answer the question. (If you're going to be snarky, at > least make sure you're right.)
Don't worry, I'm usually worse myself. And his answer did help me. I actually googled the same query, but I skipped over the first two matches after reading the title since I thought they'd just lead me to examples/pylab_examples/show_colormaps.html (which I already found and deemed to be not helpful). > Nick, this is a pretty good example: > > http://matplotlib.sourceforge.net/examples/api/colorbar_only.html If I understand correctly, this explains how to create a discrete colormap, which isn't quite what I want. But with the two links I can figure it out the rest, thanks to both of you! Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users