[tor-commits] [metrics-web/master] Remove unknown versions from graph.

karsten at torproject.org karsten at torproject.org
Fri Apr 15 20:22:14 UTC 2011


commit d7fec0847540b945074d37b3f11f5a6c288445f3
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri Apr 15 22:20:37 2011 +0200

    Remove unknown versions from graph.
---
 rserve/graphs.R |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/rserve/graphs.R b/rserve/graphs.R
index c3d0ea3..a37f9bd 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -52,11 +52,13 @@ plot_versions <- function(start, end, path, dpi) {
   versions <- fetch(rs, n = -1)
   dbDisconnect(con)
   dbUnloadDriver(drv)
+  known_versions <- c("0.1.0", "0.1.1", "0.1.2", "0.2.0", "0.2.1",
+        "0.2.2", "0.2.3")
+  versions <- versions[versions$version %in% known_versions, ]
   visible_versions <- sort(unique(versions$version))
   versions <- rbind(data.frame(
     date = as.Date(rep(end, 7)),
-    version = c("0.1.0", "0.1.1", "0.1.2", "0.2.0", "0.2.1", "0.2.2",
-        "0.2.3"),
+    version = known_versions,
     relays = rep(NA, 7)), versions)
   ggplot(versions, aes(x = as.Date(date, "%Y-%m-%d"), y = relays,
       colour = version)) +



More information about the tor-commits mailing list