Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab Plot with Customize color

Tags:

matlab

does anyone know what's the command or way to plot with different colors besides the preset color, i.e., b,g,r,c,m,y,k? I would prefer to use my own customize colors instead of these....

Cheers

like image 847
kit Avatar asked Jul 21 '12 18:07

kit


1 Answers

Use the Color property with a ColorSpec triple:

plot(x, y, 'Color', [0.5, 1.0, 0.0], 'LineStyle', '--')

The vector here contains RGB values between 0.0 and 1.0. The Lineseries and ColorSpec documentation entries have more information about this.

like image 64
You Avatar answered Nov 14 '22 00:11

You