summaryrefslogtreecommitdiffstats
path: root/bin/make_graph.py
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-15 22:10:33 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-15 22:10:33 +0200
commitaf3663a95adb346b02efe09ae7e12c03c0a7277d (patch)
tree2fde1378b0df1bc4b179cac3ce931620bc6e7bf4 /bin/make_graph.py
parent7b8f67a2692d2936e7f1a123a9370e6229deea89 (diff)
downloadjenkins.debian.net-af3663a95adb346b02efe09ae7e12c03c0a7277d.tar.xz
reproducible: include bugs with usertags in stats
Diffstat (limited to 'bin/make_graph.py')
-rwxr-xr-xbin/make_graph.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/make_graph.py b/bin/make_graph.py
index c87bd5c0..a438820c 100755
--- a/bin/make_graph.py
+++ b/bin/make_graph.py
@@ -29,11 +29,21 @@ def main():
r('t <- (read.table("'+countsfile+'",sep=",",header=1,row.names=1))')
r('cname <- c("date",rep(colnames(t)))')
# thanks to http://tango.freedesktop.org/Generic_Icon_Theme_Guidelines for those nice colors
- r('palette(c("#4e9a06", "#f57900", "#cc0000", "#2e3436", "#888a85"))')
+ if int(colors) < 10:
+ r('palette(c("#4e9a06", "#f57900", "#cc0000", "#2e3436", "#888a85"))')
+ else:
+ r('palette(c("#fce94f", "#c4a000", "#fcaf3e", "#ce5c00", \
+ "#e9b96e", "#8f5902", "#8ae234", "#4e9a06", \
+ "#729fcf", "#204a87", "#ad7fa8", "#5c3566", \
+ "#ef2929", "#a40000", "#eeeeec", "#babdb6", \
+ "#888a85", "#2e3436"))')
r('v <- t[0:nrow(t),0:'+colors+']')
# make graph since day 1
r('barplot(t(v),col = 1:'+columns+', main="'+mainlabel+'", xlab="", ylab="'+ylabel+'", space=0, border=NA)')
- r('legend(x="bottom",legend=colnames(t), ncol=2,fill=1:'+columns+',xjust=0.5,yjust=0,bty="n")')
+ if int(colors) < 10:
+ r('legend(x="bottom",legend=colnames(t), ncol=2,fill=1:'+columns+',xjust=0.5,yjust=0,bty="n")')
+ else:
+ r('legend(x="bottom",legend=colnames(t), ncol=9,fill=1:'+columns+',xjust=0.5,yjust=0,bty="n")')
grdevices.dev_off()
if __name__ == "__main__":