Plotting with gnuplot


Gnuplot is a command driven plotting program.  It is freely available.  The following sample plots represent a fraction of the plotting options of gnuplot.  Each plot is produced by typing the commands found to the left of the picture at the gnuplot prompt.  You will need to get gnuplot for Windows or Mac OS X.


Gallery of Graphs and Parametric Plots


Single variable functions 

set terminal aqua size  500 500

unset tics

set style line 5 linewidth 4 linecolor rgb "blue"

set samples 1000

plot [0:pi/4] x*sin(1/x) ls 5



Two variable real functions

set terminal aqua size  500 500

set isosamples 50

unset tics

set hidden3d

unset tics

splot cos(sqrt(x**2 + y**2))/(.05*sqrt(x**2 + y**2) + .1) ls 3 title ''



Helix

set terminal aqua size  500 500

unset tics

set style line 5 linewidth 4 linecolor rgb "blue"

set parametric

set isosamples 100

splot [0:8*pi] cos(u), sin(u), u title '' ls 5



Torus

set terminal aqua size  500 500

unset tics

set parametric

set hidden3d

set isosamples 50

splot [0:2*pi] [0:2*pi] (2 + cos(u))*cos(v), (2 + cos(u))*sin(v), sin(u) title '', 2+ (2 + cos(u))*cos(v), sin(u), (2 + cos(u))*sin(v) title ''



Helicoid

set terminal aqua size  500 500

unset tics

set parametric

set hidden3d

set isosamples 50

splot [0:4*pi] [0:1] v*cos(u), v*sin(u), u title ''



Enneper’s Surface

set terminal aqua size  500 500

unset tics

set parametric

set hidden3d

set isosamples 50

splot [-6:6] [-4:4] u - u**3/3 + u*v**2, v - v**3/3 + v*u**2, u**2 - v**2 title '' ls 3