Random colourmap?

Hi,
Is there a simple way to come up with a random colourmap? I need to plot
discrete values, and I would like that the colours do not show a trend, to
easily distinguish them?

I read the cookbook entry on "Doing your own colormap", but can't seem to
bring my mind into it!

Cheers!
Jose

José Gómez-Dans wrote:

I need to plot discrete values, and I would like that the colours do not show a trend, to easily distinguish them?

I read the cookbook entry on "Doing your own colormap", but can't seem to bring my mind into it!

Once you gfigure that out (sorry, I don't have any hints off the top of my head), this page may help you choose colors to use:

http://geography.uoregon.edu/datagraphics/color_scales.htm

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Jos� G�mez-Dans wrote:

Hi,
Is there a simple way to come up with a random colourmap? I need to plot discrete values, and I would like that the colours do not show a trend, to easily distinguish them?

It might help if you described the application. I am guessing that you have a small number of values (5? 10? 15?) and that using direct indexing with a ListedColormap will be the simplest way to get what you want.

I have recently made this easier in svn, as illustrated by the second panel in examples/colorbar_only.py, but this is not yet available in a released version of mpl.

A simpler use of a ListedColormap is given in examples/contourf_demo.py, in the last plot; this is the same in recent mpl releases as in svn.

I read the cookbook entry on "Doing your own colormap", but can't seem to bring my mind into it!

Are you referring to this http://www.scipy.org/Cookbook/Matplotlib/ColormapTransformations
?

Eric

···

Cheers!
Jose