Navigation

Operators and Keywords

Function List:

C++ API

: hsv (n)

Create color colormap. This colormap begins with red, changes through yellow, green, cyan, blue, and magenta, before returning to red.

It is useful for displaying periodic functions. The map is obtained by linearly varying the hue through all possible values while keeping constant maximum saturation and value. The equivalent code is hsv2rgb ([(0:N-1)'/N, ones(N,2)]).

The argument n must be a scalar. If unspecified, the length of the current colormap, or 64, is used.

See also: colormap.

Demonstration 1

The following code

 ## Show the 'hsv' colormap profile and as an image
 cmap = hsv (256);
 subplot (2, 1, 1);
  rgbplot (cmap, "composite");
 subplot (2, 1, 2);
  rgbplot (cmap);

Produces the following figure

Figure 1

Package: octave