plot.r 800 B

1234567891011121314151617181920212223
  1. library(ggplot2)
  2. d <- read.table("perf.dat", header=TRUE, fill=TRUE)
  3. op <- c("acceder", "remplir", "supprimer")
  4. struct <- c("arraylist", "hashmap", "vector")
  5. for (operation in op) {
  6. for (structure in struct) {
  7. ggplot(d[d$Operation == operation & d$Structure == structure,], aes(x=n, y=Temps, color=Structure)) +
  8. geom_point() + geom_smooth() +
  9. ggtitle(paste(operation, structure, sep = " ", collapse = NULL)) + xlab(paste("Taille", structure, sep = " ", collapse = NULL)) + ylab("Temps d'exécution") +
  10. theme(plot.title = element_text(hjust = 0.5))
  11. ggsave(paste(operation, "_", structure, ".png", sep = "",collapse = NULL))
  12. }
  13. }
  14. #ggplot(d,aes(x=n,y=Mem,colour=Structure,shape=Operation))+geom_point()+facet_grid(Structure~Operation)