MATLAB: Line Style Specifiers used with Color Specifiers

MATLABplot

I assigned the color of the plot using: plot(x,y, 'Color',[0,0.8,0.9]); Now I want the line to be dashed not solid, how do I do that? Trials such as plot(x,y, '–Color',[0,0.8,0.9]); failed.

Best Answer

plot(x,y, '--', 'Color',[0,0.8,0.9]);
or
plot(x,y, 'LineStyle', '--', 'Color',[0,0.8,0.9]);