Matlab Plot with Customize color

matlab

Solution

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.

Problem

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

Original source