% Copyright The Numerical Algorithms Group Limited 1991.
% Certain derivative-work portions Copyright (C) 1988 by Leslie Lamport.
% All rights reserved

% Title: 2-D Graphics

%  Author: Clifton J. Williamson
%  Date created: 3 November 1989
%  Date last updated: 3 November 1989

\begin{page}{ExPlot2DFunctions}{Plotting Functions of One Variable}
\beginscroll
To plot a function {\em y = f(x)}, you need only specify the function and the
interval on which it is to be plotted.
\graphpaste{draw(sin(tan(x)) - tan(sin(x)),x = 0..6)}
\endscroll
\autobuttons\end{page}

\begin{page}{ExPlot2DParametric}{Plotting Parametric Curves}
\beginscroll
To plot a parametric curve defined by {\em x = f(t)},
{\em y = g(t)}, specify the functions
{\em f(t)} and {\em g(t)}
as arguments of the function `curve', then give
the interval over which {\em t} is to range.
\graphpaste{draw(curve(9 * sin(3*t/4),8 * sin(t)),t = -4*\%pi..4*\%pi)}
\endscroll
\autobuttons\end{page}

\begin{page}{ExPlot2DPolar}{Plotting Using Polar Coordinates}
\beginscroll
To plot the function {\em r = f(theta)} in polar coordinates,
use the option {\em coordinates == polar}.
As usual,
call the function 'draw' and specify the function {\em f(theta)} and the
interval over which {\em theta} is to range.
\graphpaste{draw(sin(4*t/7),t = 0..14*\%pi,coordinates == polar)}
\endscroll
\autobuttons\end{page}

\begin{page}{ExPlot2DAlgebraic}{Plotting Plane Algebraic Curves}
\beginscroll
\Language{} can also plot plane algebraic curves (i.e. curves defined by
an equation {\em f(x,y) = 0}) provided that the curve is non-singular in the
region to be sketched.
Here's an example:
\graphpaste{draw(y^2 + y - (x^3 - x) = 0, x, y, range == [-2..2,-2..1])}
Here the region of the sketch is {\em -2 <= x <= 2, -2 <= y <= 1}.
\endscroll
\autobuttons\end{page}
