lines

Colormap made of the default line colors of the axes.

Category: Graphics > Formatting and Annotation

Syntax

map = lines

Returns the colors with the default number of rows.

map = lines(m)

Returns m colors, repeating the sequence when m exceeds its length.

Description

The map holds the seven colors that successive plot lines take (blue, orange, yellow, purple, green, light blue, dark red), cycled when more are requested. Use it to color several objects consistently with the lines of a plot, for example bars or filled areas drawn with fill and bar.

Input arguments

m
Number of colors, a nonnegative integer.

Output arguments

map
m-by-3 matrix of RGB values.

Example

Three line colors

c = lines(3)
Output
c = 3×3

         0    0.4470    0.7410
    0.8500    0.3250    0.0980
    0.9290    0.6940    0.1250

See also

orderedcolors colormap plot hsv parula