File: geplot

package info (click to toggle)
netpipe 3.7.2-8
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 1,188 kB
  • sloc: ansic: 7,588; makefile: 279; sh: 63; perl: 45; csh: 25
file content (50 lines) | stat: -rwxr-xr-x 1,186 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

GPLOT="$HOME/.gplot"
GPLOTPS="$HOME/.gplot.ps"

outputs=$*

echo " "
echo "Plotting $* to ~/gplot.ps"
echo " "

index=0

for ofile in $outputs
do
  index=`expr $index + 1`
#  echo index = $index
  OUTPUTS="${OUTPUTS} \"${ofile}\" ls ${index},"
done

OUTPUTS=`echo $OUTPUTS | sed 's/,$//g'`

#echo "outputs = $OUTPUTS"

echo "set data style lines" > $GPLOT
echo "set logscale x" >> $GPLOT
echo "set xrange [1:10000000]" >> $GPLOT
echo "set ylabel \"Bandwidth in Mbps\"" >> $GPLOT
echo "set xlabel \"Message Size in Bytes\"" >> $GPLOT

#echo "set linestyle 1 lt -1 lw 4" >> $GPLOT
echo "set linestyle 1 lt  3 lw 4" >> $GPLOT
echo "set linestyle 2 lt  1 lw 4" >> $GPLOT
echo "set linestyle 3 lt  5 lw 4" >> $GPLOT
echo "set linestyle 4 lt  2 lw 4" >> $GPLOT
echo "set linestyle 5 lt  4 lw 4" >> $GPLOT
echo "set linestyle 6 lt  6 lw 4" >> $GPLOT
#echo "set linestyle 7 lt  3 lw 4" >> $GPLOT
echo "set linestyle 7 lt -1 lw 4" >> $GPLOT
echo "set linestyle 8 lt  7 lw 4" >> $GPLOT

echo "set key graph 0.4, 0.9" >> $GPLOT
echo "set terminal postscript color" >> $GPLOT
echo "set output \"$GPLOTPS\"" >> $GPLOT
echo "plot $OUTPUTS" >> $GPLOT

gnuplot < $GPLOT

ghostview $GPLOTPS