%% Specify Line Style and Color
% This example shows how to specify the line styles and line colors for a plot.
% Plot a sine wave with a green dashed line using '--g'. Plot a second sine wave with a red dotted line using ':r'. The elements of the line specification can appear in any order.

x = linspace(0,2*pi,100);
y1 = sin(x);
y2 = sin(x-pi/4);

figure
plot(x,y1,'--g',x,y2,':r')

% Copyright 2012 The MathWorks, Inc.