#! /bin/csh -f # Last edited on 2000-10-14 23:27:44 by stolfi set usage = "$0 AFILE ATITLE ASCALE BFILE BTITLE BSCALE" # Input files must have records of the form # LENGTH COUNT FREQ ... # Uses the "FREQ" column to plot. if ( $#argv != 6 ) then echo "usage: ${usage}"; exit 1 endif set afile = "$1"; shift set atitle = "$1"; shift set ascale = "$1"; shift set bfile = "$1"; shift; set btitle = "$1"; shift set bscale = "$1"; shift set tmp = "/tmp/$$" set ofile = "${tmp}.eps" gnuplot <<EOF # set term x11 set term postscript eps mono "TimesRoman" 24 set output "${ofile}" set size 1.000,1.000 set xrange [0:15] set xtics 1 plot "${afile}" using 1:(\$3*${ascale}) title "${atitle}" with linespoints, \ "${bfile}" using 1:(\$3*${bscale}) title "${btitle}" with linespoints quit EOF cat ${ofile} ghostview ${ofile} /bin/rm ${ofile}