./
pp_cmap_show.pro
Routines
top source pp_cmap_show
Produces an iplot showing the color of each index in the given colormap array. Each bar is plotted with the x location corresponding to its index. See example below.
Parameters
- cm in required
The colormap to display, in a 3xn array of RGB values, with each row being the 3 values for each color index. It is the same format as returned by pp_cmap (see example below).
- locs in optional
If given an array of n values, those are used for the locations of each color plotted, instead of their indexes.
Examples
To identify the colors made by pp_cmap:
cmap=pp_cmap(6)
print,cmap
; 0 0 0
;255 0 0
;255 255 0
;0 255 0
;0 255 255
;0 0 255
;255 0 255
;127 127 127
;255 255 255
pp_cmap_show,cm
Author information
- Author:
Paulo Penteado (pp.penteado@gmail.com), Dec/2009
Statistics
Lines: | 9 lines |
Cyclomatic complexity: | 3 |
Modified cyclomatic complexity: | 3 |
File attributes
Modification date: | Wed Jun 29 22:15:28 2016 |
Lines: | 9 |
Docformat: | rst rst |