%% Specify Different Line Styles for Multiple Lines
% This example shows how to plot two sine waves with different line styles
% by adding a line specification string to each |x,y| pair. 

% Copyright 2015 The MathWorks, Inc.


%%
% Plot the first sine
% wave with a dashed line using |'--'|. Plot the second sine wave with a
% dotted line using |':'|.
x = linspace(0,2*pi,100);
y1 = sin(x);
y2 = sin(x-pi/4);

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