+ return(dset)
+}
+
+draw2 <- function(dset) {
+ ## Extract useful data
+ x.1 <- data.frame(Algo=dset$Algo, Size=dset$Size,
+ Idle_avg=dset$Idle_avg,
+ Conv_avg=dset$Conv_avg,
+ Conv_max=dset$Conv_max)
+
+ ## Reshape data -> wide
+ x.2 <- reshape(x.1, direction="wide", idvar="Algo", timevar="Size")
+
+ ## Rename rows
+ rownames(x.2) <- x.2$Algo
+ #colnames(x.2) <- sub("^[^.]*\\.", "", colnames(x.2))
+
+ ## Remove first column ("Algo")
+ x.3 <- as.matrix(x.2[-1])
+
+ x.4 <- x.3[, c(FALSE,FALSE,TRUE)]
+ barplot(x.4, beside=TRUE,
+ names.arg=sub("^[^.]*\\.", "", colnames(x.4)),
+ col=rainbow(nrow(x.3), s=.5))
+
+ x.4 <- x.3[, c(FALSE,TRUE,FALSE)]
+ barplot(x.4, beside=TRUE,
+ axes=FALSE, axisnames=FALSE, add=TRUE,
+ legend.text=TRUE,
+ col=rainbow(nrow(x.3)))
+
+ x.4 <- x.3[, c(TRUE,FALSE,FALSE)]
+ barplot(x.4, beside=TRUE,
+ axes=FALSE, axisnames=FALSE, add=TRUE,
+ col=rainbow(nrow(x.3), v=.5))
+
+ ## finally, set titles
+ t <- paste0(dset$Mode[1], dset$Distrib[1], " / ",
+ dset$Ratio[1], " / ",
+ dset$Platform[1], " / ", dset$Topo[1])
+ title(xlab="Platform Size",
+ ylab="Simulated Time (s)",
+ main=t)
+