plotting: respect types
This commit is contained in:
parent
7420aabeeb
commit
41586dd8b1
@ -2,7 +2,7 @@ library("mosaic")
|
|||||||
args = commandArgs(trailingOnly=TRUE)
|
args = commandArgs(trailingOnly=TRUE)
|
||||||
|
|
||||||
#myolors=c("#339933","#0066ff","#993300") # grün, balu, rot
|
#myolors=c("#339933","#0066ff","#993300") # grün, balu, rot
|
||||||
myolors=c("dark green","dark blue","dark red", "yellow") # grün, balu, rot
|
myolors=c("green","blue","red", "yellow", "pink", "black") # grün, balu, rot
|
||||||
|
|
||||||
if (length(args)==0) {
|
if (length(args)==0) {
|
||||||
runtype="timedump"
|
runtype="timedump"
|
||||||
@ -138,13 +138,15 @@ frame2plot <- function(maxlines,colors=NULL,draw_extreme=TRUE,doint=FALSE,over_n
|
|||||||
|
|
||||||
all_maxlines = c()
|
all_maxlines = c()
|
||||||
for (bn in BASENAMES) {
|
for (bn in BASENAMES) {
|
||||||
runtypefiles <- list.files(file.path(BENCHDIR,bn),pattern="\\.[0-9]$",full.names = TRUE)
|
runtypefiles <- list.files(file.path(BENCHDIR,bn),pattern=sprintf("%s.[0-9]$",target),full.names = TRUE)
|
||||||
|
if (length(runtypefiles) > 0) {
|
||||||
runtypetables = lapply(runtypefiles, function(x) read.table(x, quote="\"", comment.char="", col.names=c(bn)))
|
runtypetables = lapply(runtypefiles, function(x) read.table(x, quote="\"", comment.char="", col.names=c(bn)))
|
||||||
runtypetables = trim_data(runtypetables)
|
runtypetables = trim_data(runtypetables)
|
||||||
list_of_maxlines = data2maxlines(runtypetables)
|
list_of_maxlines = data2maxlines(runtypetables)
|
||||||
mean_maxline<-Reduce(function(a,b) a+b,list_of_maxlines,0)/length(runtypetables)
|
mean_maxline<-Reduce(function(a,b) a+b,list_of_maxlines,0)/length(runtypetables)
|
||||||
all_maxlines=append(all_maxlines,mean_maxline)
|
all_maxlines=append(all_maxlines,mean_maxline)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
min_length <- min(sapply(all_maxlines, length))
|
min_length <- min(sapply(all_maxlines, length))
|
||||||
all_maxlines=lapply(all_maxlines, function(v) v[1:min_length])
|
all_maxlines=lapply(all_maxlines, function(v) v[1:min_length])
|
||||||
one_frame<-data.frame(all_maxlines)
|
one_frame<-data.frame(all_maxlines)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user