% sine_9.m
% Plot sin(x) using 9 data values.
%
%  Set the data pairs.
%
xlist = [ 0.0, 0.78, 1.57, 2.35, 3.14, 3.92, 4.71, 5.49, 6.28 ];
ylist = sin ( xlist );
%
%  Clear the screen.
%
clf
%
%  Draw with a CYAN (c) LINES (-).
%
plot ( xlist, ylist, 'c-', 'LineWidth', 5 );
%
%  Allow us to add more plots to same picture.
%
hold on
%
%  Add MAGENTA (m) DOTS (.) at data values.
%
plot ( xlist, ylist, 'm.', 'MarkerSize', 50 );
%
%  Add BLACK (k) DASHED LINES (--) from (0,0) to (2*pi,0).
%
plot ( [ 0.0, 2*pi], [0.0, 0.0], 'k--' );
%
%  We are done adding to our plot.
%
hold off
%
%  Add a title.
%
title ( 'y=sin(x), 9 data points.' );
%
%  Save a JPG copy of the plot.
%
print ( '-djpeg', 'sine_9.jpg' );
