Navigation

Operators and Keywords

Function List:

C++ API

: map = gray ()
: map = gray (n)

Create gray colormap. This colormap varies from black to white with shades of gray.

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 'gray' colormap profile and as an image
 cmap = gray (16);
 subplot (2, 1, 1);
  rgbplot (cmap, "composite");
 subplot (2, 1, 2);
  rgbplot (cmap);

Produces the following figure

Figure 1

Package: octave