colormap
colormap(name, n, interpolate=True)
Produces the RGB values for a specific color map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Name of the colormap to produce. Currently, all of Cynthia Brewer's ColorBrewer maps are supported (colorbrewer2.org): |
required |
n |
How many colors of the color map to produce. If n is zero and interpolate is False, will return the maximum number of colors for this color map. |
required | |
interpolate |
bool, optional (default True)
|
If this is set to True, then this function will return |
True
|
Returns:
Name | Type | Description |
---|---|---|
C |
numpy int array
|
Resulting colormap. It can be evaluated with constant interpolation. |
See Also
apply_colormap.
Notes
Prof. Cynthia Brewer (Pennsylvania State University) has released the ColorBrewer color maps under the Apache 2.0 license (http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_updates.html)
Examples:
TODO
Source code in src/gpytoolbox/colormap.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|