More scripts to plot graphs with labels.
[pingpong.git] / plot_scripts / plot_ts_graph_smartthings-plug_labeled
diff --git a/plot_scripts/plot_ts_graph_smartthings-plug_labeled b/plot_scripts/plot_ts_graph_smartthings-plug_labeled
new file mode 100644 (file)
index 0000000..02a1fc7
--- /dev/null
@@ -0,0 +1,77 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pdfcairo enhanced font 'Verdana,10'
+set autoscale
+set key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ************ #
+# ON/OFF LABEL #
+# ************ #
+set label "1-ON" at "15:21:44", 2000 tc rgb "blue"
+set label "1-OFF" at "15:23:04", 4000 tc rgb "red"
+set label "2-ON" at "15:23:57", 2000 tc rgb "blue"
+set label "2-OFF" at "15:24:58", 4000 tc rgb "red"
+set label "3-ON" at "15:25:59", 2000 tc rgb "blue"
+set label "3-OFF" at "15:27:01", 4000 tc rgb "red"
+set label "4-ON" at "15:29:17", 2000 tc rgb "blue"
+set label "4-OFF" at "15:30:13", 2500 tc rgb "red"
+set label "5-ON" at "15:31:14", 2000 tc rgb "blue"
+set label "5-OFF" at "15:32:15", 4000 tc rgb "red"
+set label "6-ON" at "15:33:17", 8000 tc rgb "blue"
+set label "6-OFF" at "15:34:16", 4000 tc rgb "red"
+
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# SmartThings Plug switch local
+# eth1
+set output './result/smartthings-plug_switch_eth1_timestamp_local_incoming_outgoing.pdf'
+set title "SmartThings Plug Switch Incoming/Outgoing Local Traffic (eth1)"
+plot "./result/smartthings-plug_switch_eth1_local_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_local_outgoing.dat" using 1:2 with lines title "Outgoing"
+
+# ************ #
+# ON/OFF LABEL #
+# ************ #
+set label "1-ON" at "15:38:22", 1500 tc rgb "blue"
+set label "1-OFF" at "15:39:24", 1000 tc rgb "red"
+set label "2-ON" at "15:40:24", 1500 tc rgb "blue"
+set label "2-OFF" at "15:41:27", 1000 tc rgb "red"
+set label "3-ON" at "15:42:27", 1500 tc rgb "blue"
+set label "3-OFF" at "15:43:29", 1000 tc rgb "red"
+set label "4-ON" at "15:45:32", 1500 tc rgb "blue"
+set label "4-OFF" at "15:46:33", 1000 tc rgb "red"
+set label "5-ON" at "15:47:36", 1500 tc rgb "blue"
+set label "5-OFF" at "15:48:36", 1000 tc rgb "red"
+set label "6-ON" at "15:49:39", 1500 tc rgb "blue"
+set label "6-OFF" at "15:50:42", 1000 tc rgb "red"
+
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# SmartThings Plug switch remote
+# eth1
+set output './result/smartthings-plug_switch_eth1_timestamp_remote_incoming_outgoing.pdf'
+set title "SmartThings Plug Switch Incoming/Outgoing Remote Traffic (eth1)"
+plot "./result/smartthings-plug_switch_eth1_remote_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_remote_outgoing.dat" using 1:2 with lines title "Outgoing"
+
+