commit c8d5f9fe9a9162dabd1d6bf1168dc0382b419a77 Author: Karsten Loesing karsten.loesing@gmx.net Date: Mon Jul 30 10:04:58 2012 +0200
Use sequence of greens instead of default colors (#6443). --- task-6443/cumulated-weights.R | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/task-6443/cumulated-weights.R b/task-6443/cumulated-weights.R index 11458b4..e6af695 100755 --- a/task-6443/cumulated-weights.R +++ b/task-6443/cumulated-weights.R @@ -1,6 +1,7 @@ require(ggplot2) require(scales) require(reshape) +require(RColorBrewer)
cw <- read.csv("cumulated-weights.csv", stringsAsFactors = FALSE) v <- cw @@ -28,12 +29,12 @@ geom_point() + geom_line() + scale_x_continuous(name = "\nTop-x relays by exit probability") + scale_y_continuous(name = "Total exit probability\n", labels = percent) + -scale_colour_hue(name = "", +scale_colour_manual(name = "", values = rev(brewer.pal(5, "Greens")), labels = c(format(as.Date(now), format = "%B %d, %Y"), "1 week before", "1 month before", "3 months before", "1 year before")) + opts(title = paste("Probability of selecting one of the top-x relays for", "the exit position\n")) -ggsave("exit-probability-cdf-a.png", width = 8, height = 5, dpi = 100) +ggsave("exit-probability-cdf-a2.png", width = 8, height = 5, dpi = 100)
c <- cw c <- c[c$weight_type == "consensus weights", c(1, 3, 4)]