Home | Trees | Indices | Help |
|
---|
|
Translate a range of numeric values into a range of color codes.
Example:>>> p = ColorSpectrum( 'grey', 1, 500 ) >>> single_color= p.color( 250 ) >>> color_range = p.colors( range(25,250), resetLimits=0 )Available palettes are: * grey * plasma * plasma2 (default) * sausage (seems to have a discontinuity at 50%, see example below)
|
|||
|
__init__(self,
palette="plasma2",
vmin=0.,
vmax=1.) Create a new palette of given type and value range. |
||
int
|
__make_col(self,
red,
green,
blue) Create color. |
||
int
|
__normalize(self,
value) Normalize values |
||
int
|
color(self,
value) Translate a single value into a color. |
||
[int]
|
colors(self,
values,
resetLimits=1) Translate a list of values into a list of colors. |
||
array of float
|
color_array(self,
a,
resetLimits=1) Returns matrix of color codes with same dimensions as a |
||
[ (float,int) ], value
|
legend(self) Returns color mapping for each color |
||
| __map(self, x) | ||
| __grey(self, x) | ||
| __plasma2(self, x) | ||
| __plasma(self, x) | ||
| __sausage(self, x) |
|
|||
|
MAX_COL = {'grey': 3* 255, 'plasma': 3* 255, 'plasma2': 3* 255...
|
|
Create a new palette of given type and value range.
|
Create color.
|
Normalize values
|
Translate a single value into a color.
|
Translate a list of values into a list of colors.
|
|
|
|
|
|
|
|
|
MAX_COL
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Tue May 1 22:34:51 2007 | http://epydoc.sourceforge.net |