#!/bin/sh ####################################################################### # # Script to automate the generation of the GNU plot plots for # the protocol simulation skeleton.. # # written by: Tom Laramee 11/95 # # It generates a GNUplot file which is eventually run by sim.sh # on the dat file produced by sim, thereby generating a # Postscript plot file (using the GNUplot utility). # # it takes on the command line: # o O/P filename for the data file # o the number of nodes # ####################################################################### file1=data.plot1 # the names of the files which will be generated # by this script # ------------ stuff passed to this script from the "sim.sh" script op1=$1 # data files which will be eventuallty plotted nodes=$2 # the number of nodes # ------------------------- generate file 1 rm -f $file1 touch $file1 echo "set terminal postscript landscape \"helvetica\" 20" >> $file1 echo "set output \"data.plot1.ps\" " >> $file1 echo "set format xy \"%g\" " >> $file1 echo "set xlabel \"System Arrival Rate\" " >> $file1 echo "set ylabel \"Channel Utilization\" " >> $file1 echo "set title \"Utilization vs. System Arrival Rate\" " >> $file1 echo "set key" >> $file1 echo "plot \"$op1\" t '($nodes nodes) Util.' with lines 1 " >> $file1