gnuplot is a program which plots data. It has a
very simple format for its input files:
0 0 3 3... produces the picture:
i.e. a simple line from (0,0) to (3,3). The more complicated file:
0 0 1.5 1.5 3 0 0 0... gives us a triangle:
Notice we have to list the first point again at the end. This closes up the triangle.
We can even put the two together:
0 0 3 3 0 0 1.5 1.5 3 0 0 0
Suppose that we have a file triangle.dat which looks like:
0 0 1.5 1.5 3 0 0 0To plot this with
gnuplot you:
gnuplot... to start the program.
plot "triangle.dat" with linespointsto actually make the plot. It'll pop up on your screen.
set term dumbThis'll make gnuplot try to plot with ASCII characters on the screen ... sub-par, but this way you can still work.
To print gnuplot's output, type:
set term postscript set output "out.ps"Then, when you plot, the plot will be output as the file
out.ps. You can choose any name you want, of
course. This will be a postscript file, and that can be printed
on any of the University printers.
When you're done, just type quit or exit to leave gnuplot.