-for(pl in c("cluster", "grid")) {
- yy <- subset(xx, Platform == pl)
- points(yy$Size, yy$Conv_max, xlab="Size", ylab="Time")
+ ## first draw the bars
+ barplot(dset$Conv_max, axes=FALSE, col="red",
+ names=dset$Algo,
+ ylim=time_range)
+ barplot(dset$Conv_avg, axes=FALSE, col="green",
+ add=TRUE)
+ barplot(dset$Idle_avg, axes=FALSE, col="blue",
+ add=TRUE)
+
+ ## draw the time axis on the left
+ axis(2, labels=TRUE)
+ mtext("Time (s)", side=2, line=2.5)
+
+ title(xlab="Algorithms")
+
+ ## compute the data range
+ x_data_range <- c(0.6, length(dset$Algo) + 0.4)
+ data_range <- c(0, range(dset$Data_amnt)[2] * 1.04)
+
+ ## draw the data amnt line graphs
+ for (alg in unique(dset$Algo)) {
+ print(alg);
+ dset.da <- subset(dset, Algo == alg)
+ ## start a new graph, but drawn on the same device
+ par(new=TRUE)
+ plot(dset.da$Index, dset.da$Data_amnt, axes=FALSE, xlab="", type="b",
+ xlim=x_data_range,
+ yaxs="i", ylim=data_range)
+ }
+
+ ## draw the data amnt axis on the right
+ axis(4, labels=TRUE)
+ mtext("Data amount (relative)", side=4, line=2.5)
+
+ ## finally, set title
+ t <- paste0(dset$Mode[1], dset$Distrib[1], " / ", dset$Ratio[1], " / ",
+ dset$Platform[1], " / ", dset$Topo[1])
+ title(main=t)
+
+ ## restore the graphical parameters
+ par(p)
+
+}
+
+msg <- function(text,
+ wait = TRUE) {
+ if (wait)
+ readline("Press <Enter> to continue\n")
+ message(text)