[Piuparts-commits] [piuparts] 08/12: p-r: mark obsolete states with parentheses in the plot label
Holger Levsen
holger at layer-acht.org
Mon Mar 13 12:39:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 503fa5c8d2f5489b703860d8ff1e874050ee819f
Author: Andreas Beckmann <anbe at debian.org>
Date: Wed Mar 8 07:41:27 2017 +0100
p-r: mark obsolete states with parentheses in the plot label
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
piuparts-report.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/piuparts-report.py b/piuparts-report.py
index e2c9a28..3169bb9 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1231,7 +1231,9 @@ class Section:
grdevices.png(file=pngfile, width=1600, height=900, pointsize=10, res=100, antialias="none")
r = robjects.r
states = self._binary_db.get_states()
+ active_states = self._binary_db.get_active_states()
r('nstate = %d' % len(states))
+ r('snames = c(%s)' % ','.join(['"%s"' % s if s in active_states else '"(%s)"' % s for s in states]))
r('t <- (read.table("' + countsfile + '",sep=",",header=1,row.names=1))')
r('cname <- c("date",rep(colnames(t)))')
# here we define how many days we wants stats for (163=half a year)
@@ -1246,7 +1248,7 @@ class Section:
r('barplot(t(v),col = 1:palsize, \
main="Binary packages per state in ' + self._config.section + '", \
xlab="", ylab="Number of binary packages", space=0, border=NA)')
- r('legend(x="bottom",legend=colnames(t), ncol=2,fill=1:palsize,xjust=0.5,yjust=0,bty="n")')
+ r('legend(x="bottom",legend=snames, ncol=2,fill=1:palsize,xjust=0.5,yjust=0,bty="n")')
grdevices.dev_off()
stats_html = "<tr class=\"normalrow\"> " \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list