rgbplot

Plots the red, green and blue columns of a colormap as three lines.

Category: Graphics > Formatting and Annotation

Syntax

rgbplot(map)

Draws the three channels of map against the row index, in their own colors.

Description

The horizontal axis is the row number and the vertical axis the intensity, so the plot shows how each channel grows or falls along the map. This is a quick way to compare maps such as parula, jet and hot, or to check a custom map you built.

Input arguments

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

Example

Channels of the parula map

rgbplot(parula(64))
title('parula')

In the app, the figure is drawn below the code.

Notes

rgbplot draws the figure and has no output argument.

See also

colormap parula jet plot hsv