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?

Thanks,

   -Nikolaus



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.)

Nick, this is a pretty good example:

http://matplotlib.sourceforge.net/examples/api/colorbar_only.html

Now, since it seems like you're learning right now, a good place to
look which is better than google is searching matplotlib's docs
directly:

http://matplotlib.sourceforge.net/search.html

I was able to find that example with: codex ListedColormap
(codex tells it to search examples) but that's because I knew the name
of the class I was looking for.

Good luck and don't get discouraged.

Ryan

I don't know what your Google search results page presented, but the the _*second entry *_on the _*first*_ search results page, for me, was the following:

Cookbook/Matplotlib -
Feb 12, 2010 ... Show colormaps - Small script to display all of the Matplotlib colormaps, and _*an exampleshowing how to create a new one*_. ...
www.scipy.org/Cookbook/Matplotlib - Cached

-- jv




------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to