Skip to content

Instantly share code, notes, and snippets.

@nodakai
Created May 3, 2016 03:51
Show Gist options
  • Save nodakai/58777789e2431a474d2317991a38c120 to your computer and use it in GitHub Desktop.
Save nodakai/58777789e2431a474d2317991a38c120 to your computer and use it in GitHub Desktop.
library(ggplot2)
dat_10621_10001 <- read.table(file="bw-10621-10001.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10622_10002 <- read.table(file="bw-10622-10002.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10623_10003 <- read.table(file="bw-10623-10003.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10624_10004 <- read.table(file="bw-10624-10004.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10822_2 <- read.table(file="bw-10822-2.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_17033_33 <- read.table(file="bw-17033-33.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_17043_43 <- read.table(file="bw-17043-43.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_all <- read.table(file="bw-all.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
# print(dat_10621_10001)
g <- ggplot() +
geom_point(data=dat_10621_10001, aes(Time, Bandwidth), color="blue", size=.5) +
geom_point(data=dat_10622_10002, aes(Time, Bandwidth), color="lightgreen", size=.5) +
geom_point(data=dat_10623_10003, aes(Time, Bandwidth), color="cyan", size=.5) +
geom_point(data=dat_10624_10004, aes(Time, Bandwidth), color="forestgreen", size=.5) +
geom_point(data=dat_10822_2, aes(Time, Bandwidth), color="red", size=.5) +
geom_point(data=dat_17033_33, aes(Time, Bandwidth), color="orange", size=.5) +
geom_point(data=dat_17043_43, aes(Time, Bandwidth), color="purple", size=.5) +
geom_point(data=dat_all, aes(Time, Bandwidth), color="black", size=.5) +
ylim(0, 150e3)
ggsave("bandwidth.svg", g, width=80, height=20, dpi=100, limitsize=FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment