\section{Plotting functions}
Using gnuplot rascal can plot functions:

\begin{lyxcode}
>f(x)=(x\^{}3)/30-2*x+2;

>plot[f;-10;10;0.1];

\end{lyxcode}

This will plot the function $f$ from -10 to 10, computing values with
stepsize 0.1. 

Parametric plots are done as follows:

\begin{lyxcode}
>spiral(t)=[t*sin(t*pi*t) t*cos(t*pi*t)];

>pplot[spiral,0,2,0.1];

\end{lyxcode}

Last but not least rascal can do surface plots:

\begin{lyxcode}
>g(x,y)=x*x-y*y;

>splot[g;-2;2;-3;3;.2;.1];

\end{lyxcode}

The output of plots may be saved in postscript files using the plotOutput
function:

\begin{lyxcode}
>plotOutput("surface.ps");

>splot[g;-2;2;-3;3;.2;.1];
\end{lyxcode}


This is very basic plotting support and it is likely that the syntax will
change in later versions.

