File: gnuplotA.com

package info (click to toggle)
ns2 2.35%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 78,120 kB
  • sloc: cpp: 172,923; tcl: 107,127; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 812; awk: 525; csh: 355
file content (22 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# csh figure2A.com temp1.rands testname
set filename=$1
set filename3=$2
set first='"packets'
set second='"skip-1'
awk '{if ($1~/'$first'/) yes=1; if ($1~/'$second'/) yes=0; \
  if(yes==1&&NF==2){print $1, $2*100;}}' $filename > packets
set first='"drops'
awk '{if ($1~/'$first'/) yes=1; \
  if(yes==1&&NF==2){print $1, $2*100;}}' $filename > drops
gnuplot << !
# set term post
set terminal postscript eps
set xlabel "Time"
set ylabel "Packet"
set title "$filename3"
set output "$filename3.ps"
set key left box
# set size 0.6,0.8
set size 1.0,0.8 
plot "packets" with points pt 5 ps 0.3, "drops" with points pt 1 ps 2
!