Graphics

2-D Graphics

Input Output Comments
Plot[Sin[x2],{x,0,2Pi}] A simple plot A simple plot.
Plot[Tan[x], {x, -2Pi, 2Pi}] plot with singularities If the plot has singularities,
Mathematica will try to choose a suitable scale....
Plot[
   Tan[x],
   {x, -2Pi, 2Pi},
   PlotRange -> {-10,10}]
plot with range set ...or you can set it manually.
Plot[
   {Sin[x],Sin[2x],Sin[3x]},
   {x, 0, 2Pi}]
multiple plots You can plot multiple functions by
including them in curly brackets.
Show[GraphicsArray[
   {Plot[Sin[x],{x,0,Pi}],
   Plot[Sin[2x],{x,0,2Pi}]
   }]]
side-by-side plots Plot two plots, side-by-side.
ParametricPlot[
   {Cos[7t], Sin[11t]},
   {t, 0, 2Pi}]
parametric plot Parametric plot.

For more information, see section 1.9.1 in The Mathematica Book.

3-D Graphics

Input Output Comments
Plot3D[
   Sin[x y],
   {x,0, 3},
   {y, 0, 3}]
surface plot A basic surface plot.
Plot3D[
   Sin[x y],
   {x, 0, 3},
   {y, 0, 3},
   PlotPoints -> 40]
surface with more sample points You can get a finer plot if you
increase the number of sample points.
Plot3D[ Sin[x y],
   {x, 0, 3},
   {y, 0, 3},
   ViewPoint -> {1, 1, 0},
   PlotPoints -> 40,
   Boxed -> False,
   Axes -> False]
surface with options A variety of options.
Most important is the ViewPoint option,
which tells where to put the "camera".

For more information, see section 1.9.7 of The Mathematica Book.


Next:Further Reading
Previous:Functions