hot

Colormap that goes from black through red and yellow to white.

Category: Graphics > Formatting and Annotation

Syntax

map = hot

Returns a hot colormap with the default number of rows.

map = hot(m)

Returns a hot colormap with m rows.

Description

The red channel rises first, then green, then blue, so low values are dark red and high values approach white. Because the lightness increases steadily, the map stays readable in grayscale prints, which makes it a reasonable choice for intensity and temperature data.

Input arguments

m
Number of colors, a nonnegative integer.

Output arguments

map
m-by-3 matrix of RGB values between 0 and 1.

Example

Apply to a surface

map = hot(64);
size(map)
map(end, :)
surf(peaks(20))
colormap(hot)
colorbar
Output
ans = 1×2

    64     3
ans = 1×3

     1     1     1

See also

colormap jet parula gray colorbar