aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2017-06-08 08:42:30 -0400
committerMike Holmes <mike.holmes@linaro.org>2017-06-08 08:42:30 -0400
commitc2c1206b1ce073a6a105500a98f5732920916ebe (patch)
treef86d0810f9e68b4a2f789874c92117d72e31956a
parent850d85bf12337061f6e946406b4d45cafa02a972 (diff)
convert more to png
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
-rw-r--r--Signed_off_heatmaps.R38
1 files changed, 20 insertions, 18 deletions
diff --git a/Signed_off_heatmaps.R b/Signed_off_heatmaps.R
index 9e306d0..8bace46 100644
--- a/Signed_off_heatmaps.R
+++ b/Signed_off_heatmaps.R
@@ -180,41 +180,41 @@ barplot(inverse.m, las=2,
dev.off()
title <- "signed_off"
-png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
+png(file=paste(Sys.Date(),"Linaro_team",title,"git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
op <- par(mar=c(15,4,4,2))
barplot(df$signed, main=title, las=2, ylab = "number of patches / contributors per team",
names.arg = row.names(df), col = colours[1])
dev.off()
title <- "acked"
-png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
+png(file=paste(Sys.Date(),"Linaro_team",title,"git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
op <- par(mar=c(15,4,4,2))
barplot(df$acked, las=2, main=title, ylab = "number of patches / contributors per team",
names.arg = row.names(df), col = colours[2])
dev.off()
title <- "acked"
-png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
+png(file=paste(Sys.Date(),"Linaro_team",title,"git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
op <- par(mar=c(15,4,4,2))
barplot(df$reviewed, las=2, main="reviewed", ylab = "number of patches / contributors per team",
names.arg = row.names(df), col = colours[3])
dev.off()
title <- "tested"
-png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
+png(file=paste(Sys.Date(),"Linaro_team",title,"git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
op <- par(mar=c(15,4,4,2))
barplot(df$tested, las=2, main=title, ylab = "number of patches / contributors per team",
names.arg = row.names(df), col = colours[4])
dev.off()
title <- "reported"
-png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
+png(file=paste(Sys.Date(),"Linaro_team",title,"git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " "))
op <- par(mar=c(15,4,4,2))
barplot(df$reported, las=2, main=title, ylab = "number of patches / contributors per team",
names.arg = row.names(df), col = colours[5])
dev.off()
-pdf(file=paste(Sys.Date(),"Linaro_team_members_contributions.pdf", sep = "_"), title = paste(Sys.Date(),"team member contributions",sep = " "))
+pdf(file=paste(Sys.Date(),"Linaro_team_members_raw_contributions.pdf", sep = "_"), title = paste(Sys.Date(),"team member raw contributions",sep = " "))
op <- par(mfrow=c(1, 1), mar =c(15,4,4,10))
for (team in row.names(df)) {
@@ -249,17 +249,18 @@ for (team in row.names(df)) {
args.legend = list(
x='right',
bty='n',
- inset=c(-0.45,0,
+ inset=c(-0.2,0,
xpd=TRUE)
)
)
}
dev.off()
-pdf(file=paste(Sys.Date(),"Linaro_team_members_contributions_heatmap.pdf", sep = "_"),
- title = paste(Sys.Date(),"team member contributions heatmap",sep = " "),
- width=20)
-op <- par(mfrow=c(1, 1), mar =c(15,4,4,10))
+print("---------1----------")
+png(file=paste(Sys.Date(),"Linaro_team_members_contributions_barplot.png", sep = "_"),
+ title = paste(Sys.Date(),"team member contributions heatmap",sep = " ",width=2000)
+ )
+
all_people <- matrix(nrow=length(unique.persons), ncol=length(unique.tags))
rownames(all_people) <- unique.persons
@@ -269,8 +270,6 @@ all_people[] <- 0L
for (team in row.names(df)) {
contributions <- data.frame (df[team, ]$contribution)
- print(team)
-
tab <- as.data.frame( table(contributions))
for (r in 1:nrow(tab)) {
@@ -288,20 +287,25 @@ barplot(
bty='L',
col = colours,
legend.text = TRUE,
- xlim=c(0,100),
args.legend = list(
x='right',
bty='n',
- inset=c(-0.45,0,
+ inset=c(-0.2,0,
xpd=TRUE)
)
)
+dev.off()
+
+print("---------2----------")
+png(file=paste(Sys.Date(),"Linaro_team_members_contributions_heatmap.png", sep = "_"),
+ title = paste(Sys.Date(),"team member contributions heatmap",sep = " "),width=1000)
+op <- par(mfrow=c(1, 1), mar =c(10,4,4,10))
+
# following code limits the lowest and highest color to 5%, and 95% of your range, respectively
quantile.range <- quantile(all_people, probs = seq(0, 1, 0.01))
palette.breaks <-
seq(quantile.range["5%"], quantile.range["95%"], 0.1)
-
# use http://colorbrewer2.org/ to find optimal divergent color palette (or set own)
color.palette <-
colorRampPalette(c("#FC8D59", "#FFFFBF", "#91CF60"))(length(palette.breaks) - 1)
@@ -320,6 +324,4 @@ color.palette <-
sepwidth=c(0.1, 0.1)
)
-
-
dev.off() \ No newline at end of file