plot_approfondie.r 879 B

12345678910111213141516
  1. library(ggplot2)
  2. d <- read.table("perf_hypothese2.dat", header=TRUE, fill=TRUE)
  3. listOPs <- c("acceder", "remplir")
  4. listStructs <- c("arraylist", "vector")
  5. for (operation in listOPs) {
  6. ggplot(d[d$Operation == operation ,], aes(x=n, y=Temps, color=Structure)) + geom_smooth() +
  7. ggtitle(operation) + xlab("Nombre d'éléments") + ylab("Temps d'exécution") +
  8. theme(plot.title = element_text(hjust = 0.5)) + facet_grid(Structure ~ Operation)
  9. ggsave(paste(operation, "_tps_appro.png", sep=""))
  10. ggplot(d[d$Operation == operation ,], aes(x=n, y=Mem, color=Structure)) + geom_smooth() +
  11. ggtitle(operation) + xlab("Nombre d'éléments") + ylab("Consommation mémoire") +
  12. theme(plot.title = element_text(hjust = 0.5)) + facet_grid(Structure ~ Operation)
  13. ggsave(paste(operation, "_mem_appro.png", sep=""))
  14. }