Documentation for pp_lib

Generated by IDLdoc

./

pp_cmap_show.pro


top source pp_cmap_show

pp_cmap_show, cm [, locs]

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
McCabe complexity:
4

File attributes

Modification date: Thu Jan 31 16:29:45 2013
Lines: 41
Docformat: rst rst