[Sumover-dev] [svn commit] r4837 - vic/branches/cc/cc

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Fri May 14 00:27:08 BST 2010


Author: soohyunc
Date: Fri May 14 00:27:08 2010
New Revision: 4837

Modified:
   vic/branches/cc/cc/plots.sh

Log:
changes for gnuplot script
  (when xr_send.xg exists, then plot it)



Modified: vic/branches/cc/cc/plots.sh
==============================================================================
--- vic/branches/cc/cc/plots.sh	(original)
+++ vic/branches/cc/cc/plots.sh	Fri May 14 00:27:08 2010
@@ -1,103 +1,169 @@
 #!/bin/sh
 
+#---------------------------------------------------------------------#
+# inter-active plots
+#---------------------------------------------------------------------#
+if [ -e xr_send.xg ]
+then
 gnuplot -persist << EOF
+  set style line 1 lt 1 pt 4 lw 1.5
+  set style line 2 lt 2 pt 4 lw 1.5
+  set style line 3 lt 3 pt 4 lw 1.5
+  set style line 4 lt 4 pt 4 lw 1.5
+  set style line 5 lt 5 pt 4 lw 1.5
+
+  set mxtics 2
+  set mytics 4
+  set grid
 
-set style line 1 lt 1 pt 4 lw 1.5
-set style line 2 lt 2 pt 4 lw 1.5
-set style line 3 lt 3 pt 4 lw 1.5
-set style line 4 lt 4 pt 4 lw 1.5
-set style line 5 lt 5 pt 4 lw 1.5
-
-set mxtics 2
-set mytics 4
-set grid
+  set xrange [$1:$2]
+  set yrange [$3:$4]
 
-set xrange [$1:$2]
-set yrange [$3:$4]
+  plot \
+	"encs.xg" with impulses title "start encoding", \
+	"ence.xg" with impulses title "end encoding", \
+	"inXR.xg" with impulses title "ackvec arrival", \
+	"txq.xg"  with linespoints lw 2.5 pt 5 title "tx queue", \
+	"cwnd.xg" with linespoints lw 2.5 lc 9 pt 6 title "cwnd", \
+	"seqno.xg" ls 3 title "packet", \
+	"xr_send.xg" using 1:4 with impulses lt 1 lc 0 title "XR sent"
+EOF
+else
+gnuplot -persist << EOF
+  set style line 1 lt 1 pt 4 lw 1.5
+  set style line 2 lt 2 pt 4 lw 1.5
+  set style line 3 lt 3 pt 4 lw 1.5
+  set style line 4 lt 4 pt 4 lw 1.5
+  set style line 5 lt 5 pt 4 lw 1.5
+
+  set mxtics 2
+  set mytics 4
+  set grid
 
-plot \
+  set xrange [$1:$2]
+  set yrange [$3:$4]
+
+  plot \
 	"encs.xg" with impulses title "start encoding", \
 	"ence.xg" with impulses title "end encoding", \
 	"inXR.xg" with impulses title "ackvec arrival", \
 	"txq.xg"  with linespoints lw 2.5 pt 5 title "tx queue", \
 	"cwnd.xg" with linespoints lw 2.5 lc 9 pt 6 title "cwnd", \
 	"seqno.xg" ls 3 title "packet"
-
 EOF
+fi
 
+#---------------------------------------------------------------------#
+# eps plot
+#---------------------------------------------------------------------#
+if [ -e xr_send.xg ]
+then
 gnuplot -persist << EOF
-set terminal postscript eps enhanced color
-set output "seqno.eps"
+  set terminal postscript eps enhanced color
+  set output "seqno.eps"
 
-set title "time-seqno plot"
-set xlabel "time (sec)"
-set ylabel "seqno"
+  set title "time-seqno plot"
+  set xlabel "time (sec)"
+  set ylabel "seqno"
 
-set mxtics 2
-set mytics 4
+  set mxtics 2
+  set mytics 4
 
-set xrange [$1:$2]
-set yrange [$3:$4]
-
-plot \
-"encs.xg" with impulses title "start encoding", \
-"ence.xg" with impulses title "end encoding" lc 4 lt 1, \
-"inXR.xg" with impulses title "ackvec arrival" lt 1 lc 2, \
-"txq.xg"  with linespoints lw 2.5 lc 0 lt 1 pt 5 title "tx queue", \
-"cwnd.xg" with linespoints lw 2.5 lc 9 lt 1 pt 6 title "cwnd", \
-"seqno.xg" pt 4 lc 3 title "packet"
+  set xrange [$1:$2]
+  set yrange [$3:$4]
 
+  plot \
+	"encs.xg" with impulses title "start encoding", \
+	"ence.xg" with impulses title "end encoding" lc 4 lt 1, \
+	"inXR.xg" with impulses title "ackvec arrival" lt 1 lc 2, \
+	"txq.xg"  with linespoints lw 2.5 lc 0 lt 1 pt 5 title "tx queue", \
+	"cwnd.xg" with linespoints lw 2.5 lc 9 lt 1 pt 6 title "cwnd", \
+	"seqno.xg" pt 4 lc 3 title "packet", \
+	"xr_send.xg" using 1:4 with impulses lt 1 lc 0 title "XR sent"
 EOF
-
+else
 gnuplot -persist << EOF
-set terminal postscript eps enhanced color
-set output "enct.eps"
+  set terminal postscript eps enhanced color
+  set output "seqno.eps"
 
-set title "encoding time"
-set xlabel "num encoding"
-set ylabel "time (sec)"
+  set title "time-seqno plot"
+  set xlabel "time (sec)"
+  set ylabel "seqno"
 
-set mxtics 2
-set mytics 2
-set xrange [$1:$2]
-set yrange [0:]
+  set mxtics 2
+  set mytics 4
 
-plot \
-"enct.xg" with lp title "encoding time", \
-"grt.xg" with lp lt 1 lc 3 title "grabbing time"
+  set xrange [$1:$2]
+  set yrange [$3:$4]
 
+  plot \
+	"encs.xg" with impulses title "start encoding", \
+	"ence.xg" with impulses title "end encoding" lc 4 lt 1, \
+	"inXR.xg" with impulses title "ackvec arrival" lt 1 lc 2, \
+	"txq.xg"  with linespoints lw 2.5 lc 0 lt 1 pt 5 title "tx queue", \
+	"cwnd.xg" with linespoints lw 2.5 lc 9 lt 1 pt 6 title "cwnd", \
+	"seqno.xg" pt 4 lc 3 title "packet"
 EOF
+fi
+
 
+#---------------------------------------------------------------------#
+# encoding time related
+#---------------------------------------------------------------------#
 gnuplot -persist << EOF
-set terminal postscript eps enhanced color
-set output "cwnd.eps"
+  set terminal postscript eps enhanced color
+  set output "enct.eps"
 
-set title "cwnd"
-set xlabel "vic run time (sec)"
-set ylabel "cwnd"
+  set title "encoding time"
+  set xlabel "num encoding"
+  set ylabel "time (sec)"
+
+  set mxtics 2
+  set mytics 2
+  set xrange [$1:$2]
+  set yrange [0:]
+
+  plot \
+	"enct.xg" with lp title "encoding time", \
+	"grt.xg" with lp lt 1 lc 3 title "grabbing time"
+EOF
+
+#---------------------------------------------------------------------#
+# cwnd
+#---------------------------------------------------------------------#
+gnuplot -persist << EOF
+  set terminal postscript eps enhanced color
+  set output "cwnd.eps"
 
-set mxtics 5
-set mytics 2
-set xrange [$1:$2]
-set yrange [0:]
-set grid xtics ytics mytics
+  set title "cwnd"
+  set xlabel "vic run time (sec)"
+  set ylabel "cwnd"
+
+  set mxtics 5
+  set mytics 2
+  set xrange [$1:$2]
+  set yrange [0:]
+  set grid xtics ytics mytics
 
-plot "cwnd.xg" w lp lc 3 pt 4 ps .4 title "cwnd"
+  plot "cwnd.xg" w lp lc 3 pt 4 ps .4 title "cwnd"
 EOF
 
+#---------------------------------------------------------------------#
+# ALI
+#---------------------------------------------------------------------#
 gnuplot -persist << EOF
-set terminal postscript eps enhanced color
-set output "ALI.eps"
-
-set title "average loss interval"
-set xlabel "vic run time (sec)"
-set ylabel "ALI"
+  set terminal postscript eps enhanced color
+  set output "ALI.eps"
 
-set mxtics 5
-set mytics 2
-set xrange [0:]
-set yrange [0:]
-set grid xtics ytics mytics
+  set title "average loss interval"
+  set xlabel "vic run time (sec)"
+  set ylabel "ALI"
+
+  set mxtics 5
+  set mytics 2
+  set xrange [0:]
+  set yrange [0:]
+  set grid xtics ytics mytics
 
-plot "ALI.xg" w lp lc 1 pt 5 ps .4 title "ALI"
+  plot "ALI.xg" w lp lc 1 pt 5 ps .4 title "ALI"
 EOF



More information about the Sumover-dev mailing list