blob: 0f28f6e5fca90c1f1f22b12355830902ba3c8976 [file] [log] [blame]
Alexander Afanasyev27370c52013-03-12 13:54:08 -07001#!/usr/bin/env Rscript
2# Copyright (c) 2012-2013 Alexander Afanasyev <alexander.afanasyev@ucla.edu>
3
4
5# install.packages ('ggplot2')
6library (ggplot2)
7## # install.packages ('scales')
8## library (scales)
9
10#########################
11# Rate trace processing #
12#########################
13data = read.table ("drop-trace.txt", header=T)
14data$Node = factor (data$Node)
15data$Kilobits <- data$Kilobytes * 8
16data$Type = factor (data$Type)
17
18## data.rtr = data[grep("Rtr", data$Node),]
19
20# graph rates on all nodes in Kilobits
21g.all <- ggplot (data, aes (x=Time, y=Kilobits, color=Type)) +
22 geom_point (size=2) +
23 geom_line () +
24 ylab ("Packet drop rate [Kbits/s]") +
25 facet_wrap (~ Node) +
26 theme_bw ()
27
28png ("drop-trace-all-nodes.png", width=800, height=500)
29print (g.all)
30x = dev.off ()