Tony's Quick Gnuplot Guide

$Id: gnuplot.html,v 1.2 1998/02/24 08:39:19 tdarugar Exp $
http://www.parand.com/docs/gnuplot.html

This is a very short guide to using gnuplot. Just the basics.

The format of the data is very simple. All gnuplot wants is a text file with 2 numbers per line: the first is the x value, the second the y value. For example, it'll happily plot this:

1	0.3
4	1.0
9	4.5
34	3.9
So, make your data look like that. Now for the gnuplot part: start it up with
	gnuplot
The main commands you'll care about:

So now you're plotting your beautiful data, and want a printout. Do this:
set output "output.ps"
set terminal postscript default
[your plotting commands]
show output
set terminal x11
Substituting your favorite filenames as appropriate. You'll get a postscript file. So, one last trick: you can put all these commands into a text file, and run it from within gnuplot with
load "scriptfile"
Or, you can give it as a commandline parameter to gnuplot, as in
gnuplot scriptfile

Examples

set term pbm small color
set size 0.8,0.8
set output "/tmp/nSubs.pbm"
set title "Number of Subscribers Per Day"
set xlabel "Date"
set ylabel "Number of Subscribers"
plot "< tail -30 /usr/local/etc/mc-httpd9/stats/dates.txt" using 1:3 title 'Number of Subscribers' with boxes
show output

Good luck. Tony. (tdarugar@binevolve.com)