    Simple Plot Example

        1) always clear the name space.

kill(all)$

van=facebook.com/lvanwarren$

        2) Define the function.

f(x):= x^2;

        3) Plot2D using gnuplot. Need XQuartz on MacOS

plot2d([f(x)], [x,-5,5],
 [plot_format, gnuplot],
 [gnuplot_postamble, "set zeroaxis;"])$

plot2d([f(x)], [x,-5,5], [style, [lines,4,2]],
 [plot_format, gnuplot],
 [gnuplot_postamble, "set zeroaxis;"])$

        4) Plot3D

expr_1: cos(y)*(10.0+6*cos(x))$
expr_2: sin(y)*(10.0+6*cos(x))$
expr_3: -6*sin(x)$
plot3d (
        [expr_1, expr_2, expr_3],
        [x, 0, 2*%pi],[y, 0, 2*%pi],
        ['grid, 50, 50]);

set_plot_option(['plot_format, 'gnuplot_pipes])$

expr_1: n$
expr_2: a$
expr_3: n*a$
plot3d (
        [expr_1, expr_2, expr_3],
        [n, 0, 2*%pi],[a, 0, 2*%pi],
        ['grid, 50, 50]);