Generates a magenta, red, yellow colormap.
MAGMA(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)');magma

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 colors ranging from magenta (lowest) to yellow (highest).
W1: inferno;showcmap()
W2: magma;showcmap()
W3: plasma;showcmap()

W1, W2 and W3 display similar 32x256 colormaps where 256 is the colormap length.
magma by itself sets the colormap and shading.
a = magma or setcolormap(magma) returns the RGB values. In this case, use SETSHADING to make the new colormap take effect on an existing density or 2D plot.
MAGMA is a perceptually uniform colormap that is softer and more muted than INFERNO. It is often chosen for astrophysics, geology and any visualization where dark backgrounds dominate.
See CIVIDIS, INFERNO, PLASMA and VIRIDIS for more perceptually uniform colormaps.