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.9So, make your data look like that. Now for the gnuplot part: start it up with
gnuplotThe main commands you'll care about:
helpquitplot "filename" plot "filename1", "filename2"set data style XXXcd "dirName"set title "Grand old Title"set xlabel "Guess what"set ylabel "..."set terminal XXXset output "output.ps" set terminal postscript default [your plotting commands] show output set terminal x11Substituting 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
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