Remove service addresses, add graph letters (#15513).
[tor-metrics-tasks.git] / task-4499 / bridge-scaling.R
bloba64a728bce0b6a2205a9cfedc2cba353274946ba
1 library(ggplot2)
2 d <- read.csv("bridge-scaling.csv", header = TRUE)
3 t <- d[d$variable == "1tarball", ]
4 b <- d[d$variable == "2bridgedb", ]
5 m <- d[d$variable == "3metricsdb", ]
6 d <- rbind(
7   data.frame(x = t$x, y = t$y, colour = t$colour,
8     variable = "Tarball size in GiB/day"),
9   data.frame(x = b$x, y = b$y, colour = b$colour,
10     variable = "BridgeDB time in min"),
11   data.frame(x = m$x, y = m$y, colour = m$colour,
12     variable = "metrics-db time in min"))
13 ggplot(d, aes(x = x, y = y, colour = colour)) +
14 geom_line(colour = "black") +
15 geom_point() +
16 facet_grid(variable ~ ., scales = "free_y") +
17 scale_x_continuous(name = "\nRunning bridges (2012-01-31 = 838, red)") +
18 scale_y_continuous(name = "") +
19 scale_colour_manual(name = "", values = c("black", "red")) +
20 opts(legend.position = "none",
21   title = "Scalability of Tor's bridge infrastructure\n")
22 ggsave("bridge-scaling-graph.pdf", width = 7, height = 6, dpi = 100)