CS112: Lab 2 :: More MATLAB ::: plotting

xcoords = [1 3 6]  
ycoords = [2 1 4]  
plot (ycoords)  
hold on  
plot (xcoords,ycoords)  
Figure 1 Figure 2
 
figure  
plot(xcoords,ycoords,'r:*')  
axis equal  
xlabel('x coordinates')  
ylabel('y coordinates')  
% note two single quotes for apostrophe:  
title('Sohie''s Simple Graph')
axis ([0 7 0 5])  
hold on  
% Search online help for "LineSpec", for more info
% on line specifications
 
plot ([2 5], [4 2], 'g--^')  
legend('Line 1','Line 2');  
hold off