Main Content

abyss

Abyss colormap array

Since R2023b

  • Abyss colormap

Description

example

c = abyss returns the abyss colormap as a three-column array with the same number of rows as the colormap for the current figure (gcf). If no figure exists, then the number of rows is equal to the default length of 256. Each row in the array contains the red, green, and blue intensities for a specific color. The intensities are in the range [0, 1], and the color scheme looks like this image.

Sample of the abyss colormap

c = abyss(m) returns the colormap with m colors.

Examples

collapse all

Display an image of the membrane function.

imagesc(membrane)

Change the colormap to abyss.

colormap abyss

Heatmap charts use the 256-sampling of the sky colormap by default. You can change the colormap and the sampling by specifying the Colormap name-value argument of the heatmap function.

For example, create two heatmap charts in a 2-by-1 tiled chart layout. The top chart uses 256 colors of the abyss colormap, and the bottom chart uses only two colors.

tiledlayout(2,1)

% Top chart with default number of colors
nexttile
cdata = magic(10);
heatmap(cdata,Colormap=abyss)
title("256 Colors")

% Bottom chart with two colors
nexttile
heatmap(cdata,Colormap=abyss(2))
title("2 Colors")

Input Arguments

collapse all

Number of colors, specified as a nonnegative integer. The default value of m is the number of colors in the current figure's colormap. If no figure exists, the default value is 256.

Data Types: single | double

Version History

Introduced in R2023b