Navigation

Operators and Keywords

Function List:

C++ API

Function File: rgbplot (cmap)
Function File: rgbplot (cmap, style)
Function File: h = rgbplot (…)

Plot the components of a colormap.

Two different styles are available for displaying the cmap:

profile (default)

Plot the RGB line profile of the colormap for each of the channels (red, green and blue) with the plot lines colored appropriately. Each line represents the intensity of each RGB components across the colormap.

composite

Draw the colormap across the X-axis so that the actual index colors are visible rather than the individual color components.

The optional return value h is a graphics handle to the created plot.

Run demo rgbplot to see an example of rgbplot and each style option.

See also: colormap.

Demonstration 1

The following code

 clf;
 subplot (1, 2, 1);
 rgbplot (ocean, "profile");
 subplot (1, 2, 2);
 rgbplot (ocean, "composite");

Produces the following figure

Figure 1

Package: octave