Generates a repeating red, white, blue and black colormap.
FLAG(len)
len |
- |
Optional. An integer, the colormap length. Defaults to the length of the current colormap. |
A table of RGB triples suitable for the SETCOLORMAP function.
clen = length(getcolormap());
W1: density(ravel(rep(0..(clen-1), 32), clen)');sety(0, 8);flag

creates a table of 32 x N (where N == colormap length) RBG values and displays the resulting colors. The resulting image is a vertical plot of the repeating discrete colors red, white, blue and black.
W1: flag;showcmap();sety(0, 31)
W2: prism;showcmap();sety(0, 31)

W1 and W2 display discrete, repeating 32x256 colormaps where 256 is the colormap length.
flag by itself sets the colormap and shading.
a = flag or setcolormap(flag) returns the RGB values. In this case, use SETSHADING to make the new colormap take effect on an existing density or 2D plot.
The FLAG colormap cycles repeatedly through red, white, blue, and black in sharp, distinct bands. It does not interpolate smoothly between colors. Instead, it produces discrete, abrupt steps or stripes.