Victus Spiritus

home

Handy Reference Sheet for Matlab Plots

29 Jun 2011

When plotting in Matlab it's useful to quickly pass a plot strong to a plotting function (plot, plot3, etc).

plot(x,y,'.r')
plot3(x,y,z,'xb')
plot(data,^g')

are all acceptable symbol and color combinations

Symbols

Marker Specifier Description

'+'

Plus sign

'o'

Circle

'*'

Asterisk

'.'

Point

'x'

Cross

'square' or 's'

Square

'diamond' or 'd'

Diamond

'^'

Upward-pointing triangle

'v'

Downward-pointing triangle

'>'

Right-pointing triangle

'<'

Left-pointing triangle

'pentagram' or 'p'

Five-pointed star (pentagram)

'hexagram' or 'h'

Six-pointed star (hexagram)

'none'

No marker (default)

Colors:

RGB Value

Short Name

Long Name

[1 1 0]

y

yellow

[1 0 1]

m

magenta

[0 1 1]

c

cyan

[1 0 0]

r

red

[0 1 0]

g

green

[0 0 1]

b

blue

[1 1 1]

w

white

[0 0 0]

k

black