-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoxPlot.R
35 lines (28 loc) · 920 Bytes
/
BoxPlot.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#############################################################
# ExecuteJMetal ::R functions::
#
# Author: Lucas Prestes [email protected]
#
#
#
# #### R functions of JMetal (modified) ####
#
#
#############################################################
JMetalBoxplot <- function(algorithms, indicator, problem){
data <- matrix(nrow=50,ncol=length(algorithms))
i<-1
for(algorithm in algorithms){
file <- paste("../data/",algorithm,"/",problem,"/",indicator, sep="")
data[,i] <- c(scan(file))
i=i+1
}
boxplot(data,names=algorithms,
notch = TRUE,
use.cols=TRUE,#use boxplot with matrix
cex.axis=0.65)#,xaxt='n',xlab="")
#axis(1, at=seq(1, length(algorithms), by=1), labels = FALSE)
#text(seq(1, length(algorithms), by=1), par("usr")[4] - 0.27, labels = algorithms, srt = 45, pos = 1, xpd = TRUE,cex=0.7)
titulo <-paste(indicator, problem, sep=":")
title(main=titulo)
}