# plot2d (expr, xrange)

Graph Popping Up in Separate Window

plot2d(x^2+4,[x,-2,2]);

plot2d(sin(2*theta),[theta,-%pi,%pi]);

plot2d(2*cos(2*theta),[theta,0,%pi]);

plot2d(%e^x,[x,-2,2]);

plot2d(log(x),[x,-2,2]);

plot2d(cos(theta)+sin(4*theta),[theta,-%pi,%pi]);

# plot2d (expr, xrange)

Ploting into the wxMaxima Working Window

wxplot2d(x^2+4,[x,-2,2]);

wxplot2d(sin(2*theta),[theta,-%pi,%pi]);

wxplot2d(2*cos(2*theta),[theta,0,%pi]);

wxplot2d(%e^x,[x,-2,2]);

wxplot2d(log(x),[x,-2,2]);

wxplot2d(cos(theta)+sin(4*theta),[theta,-%pi,%pi]);

# plot2d (expr, xrange,yrange)

plot2d(x^2+4,[x,-2,2],[y,0,10]);

plot2d(cos(2*theta),[theta,-%pi,%pi],[y,0,1]);

plot2d(%e^x,[x,-2,2],[y,0,5]);

plot2d(1/log(2*x),[x,-2,2],[y,-1,1]);

# plot2d([expr 1, ..., expr n], xrange)

plot2d([sin(x),cos(x)],[x,0,2*%pi]);

plot2d([sin(x),sin(2*x)],[x,0,2*%pi]);

plot2d([8*sin(x),4*cos(x)],[x,0,2*%pi]);

plot2d([2*x^2,cos(x)],[x,-%pi,%pi]);

# plot2d([expr 1, ..., expr n], xrange,yrange)

plot2d([sin(x),cos(x)],[x,0,2*%pi],[y,0,1]);

plot2d([sin(x),sin(2*x)],[x,0,2*%pi],[y,0,1]);

plot2d([8*sin(x),4*cos(x)],[x,0,2*%pi],[y,0,8]);

plot2d([2*x^2,cos(x)],[x,-%pi,%pi],[y,0,5]);

# plot2d([discrete,xvalues,yvalues])

xvalues:[0,3,6,4,6,3,0,2,0]$

yvalues:[0,2,0,3,6,4,6,3,0]$

plot2d([discrete,xvalues,yvalues]);

plot2d([discrete,[[3,1],[5,3],[3,5],[1,3],[3,1]]]);

# plot2d([parametric,x(t),y(t),trange],opts)

plot2d([parametric,3*sin(t),4*cos(t),[t,0,2*%pi]]);

plot2d([parametric,sin(t),sin(2*t),[t,0,2*%pi]],[nticks,100]);

plot2d([parametric,8*sin(t),4*cos(t),[t,0,2*%pi]]);

plot2d([parametric,2*t^2,cos(t),[t,-%pi,%pi]]);

# plot3d(f(x,y),xrange,yrange)

plot3d(1/(1+x^2+y^2),[x,-3,3],[y,-3,3])$

plot3d(sin(x^2+y^2),[x,-5,5],[y,-5,5])$

plot3d(x+y+sin(x*y),[x,-10,10],[y,-10,10])$

plot3d(x^2-2*y^2+cos(x*y),[x,-10,10],[y,-10,10])$

# plot3d([x(u, v),y(u, v),z(u, v)],urange,vrange)

plot3d([cos(u),v,v^2+sin(u)],[u,-3,3],[v,-3,3])$

plot3d([t,u,sin(t*u)],[t,0,3],[u,0,3])$

[fx:cos(x),fy:y,fz:sin(x)+y^2];

plot3d([fx,fy,fz],[x,0,2*%pi],[y,0,1])$

# contour_plot(f(x,y),xrange,yrange)

contour_plot(1/(1+x^2+y^2),[x,-3,3],[y,-3,3])$

contour_plot(sin(x^2+y^2),[x,-5,5],[y,-5,5])$

contour_plot([cos(u),v,v^2+sin(u)],[u,-3,3],[v,-3,3])$

contour_plot([t,u,sin(t*u)],[t,0,3],[u,0,3])$

# Set options

plot_options;

set_plot_option([color,cyan]);

plot2d(x^2+4,[x,-2,2]);

set_plot_option([axes,true]);

# Options

plot2d([x^2,x^2+4],[x,-2,2],[y,0,10],[xlabel,"Independent variable"]);

plot2d([x^2,x^2+4],[x,-2,2],[y,0,10],[xlabel,"Independent variable"],[ylabel,"Dependent variable"],[legend,"First","Second"]);

plot2d([x^2,x^2+4],[x,-2,2],[y,0,10],[xlabel,"Independent variable"],[ylabel,"Dependent variable"],[legend,"First","Second"],[gnuplot_term,gif],[gnuplot_out_file,"graph.gif"]);

# Style

xvalues:[23.1,32.8,31.8,32.0,30.4,24.0,39.5,24.2,52.5,37.9];

yvalues:[10.5,16.7,18.2,17.0,16.3,10.5,23.1,12.4,24.9,22.8];

plot2d([discrete,xvalues,yvalues],[style,[points,1,2]],[xlabel,"Independent variable"],[ylabel,"Dependent variable"]);