Color Map

Hello
   I am trying to use imshow as below

im = imshow(Z, interpolation='spline16', origin='lower', cmap=cm.hot,
extent=(-1.,1.,-1.,1.))

Trouble is I want to reverse the color gradient or use some colorscheme
which has lighter color at the bottom and darker higher up. What is the
easiest solution to this problem? Thanks a bunch.

Rit

(almost?) all the colormaps exist in reversed forms, eg, cm.hot_r

Hello
  I am trying to use imshow as below

im = imshow(Z, interpolation='spline16', origin='lower', cmap=cm.hot,
extent=(-1.,1.,-1.,1.))

Trouble is I want to reverse the color gradient or use some colorscheme
which has lighter color at the bottom and darker higher up. What is the
easiest solution to this problem? Thanks a bunch.

Rit

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Chloe Lewis
Graduate student, Amundson Lab
Division of Ecosystem Sciences, ESPM
University of California, Berkeley
137 Mulford Hall - #3114
Berkeley, CA 94720-3114
chlewis@...2456...

···

On Jul 20, 2009, at 10:47 AM, Ritayan Mitra wrote:

Ritayan Mitra wrote:

Hello
   I am trying to use imshow as below

im = imshow(Z, interpolation='spline16', origin='lower', cmap=cm.hot,
extent=(-1.,1.,-1.,1.))

Trouble is I want to reverse the color gradient or use some colorscheme
which has lighter color at the bottom and darker higher up. What is the
easiest solution to this problem? Thanks a bunch.

All the standard colormaps like cm.hot have reversed counterparts with "_r" appended to the name, so use cmap=cm.hot_r.

Eric

···

Rit

and if you look at the cookbook … you can see all the available colormaps…

http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps

have fun

···

On Mon, Jul 20, 2009 at 8:25 PM, Eric Firing <efiring@…202…> wrote:

Ritayan Mitra wrote:

Hello

I am trying to use imshow as below

im = imshow(Z, interpolation=‘spline16’, origin=‘lower’, cmap=cm.hot,

extent=(-1.,1.,-1.,1.))

Trouble is I want to reverse the color gradient or use some colorscheme

which has lighter color at the bottom and darker higher up. What is the

easiest solution to this problem? Thanks a bunch.

All the standard colormaps like cm.hot have reversed counterparts with

“_r” appended to the name, so use cmap=cm.hot_r.

Eric

Rit


Enter the BlackBerry Developer Challenge

This is your chance to win up to $100,000 in prizes! For a limited time,

vendors submitting new applications to BlackBerry App World™ will have

the opportunity to enter the BlackBerry Developer Challenge. See full prize

details at: http://p.sf.net/sfu/Challenge


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users