plot2.r 653 B

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