#!/usr/bin/env Rscript


library(ggplot2)

perf <- read.table("../results.dat", header = TRUE)

ggplot(perf,aes(x=occu, y=temps, color=struct))+
    geom_point()+geom_smooth()+
    ggtitle("Le temps sur les opérations ")+
    xlab("Occurence")+
    ylab("Temps")+
    facet_grid(rows=vars(struct),cols=vars(test))
ggsave("allComparaisonTime.png")

ggplot(perf,aes(x=occu, y=memoire, color=struct))+
    geom_point()+geom_smooth()+
    ggtitle("La mémoire prise par les opérations ")+
    xlab("Occurence")+
    ylab("Memoire")+
    facet_grid(rows=vars(struct),cols=vars(test))+
    ylim(0,100000)
ggsave("allComparaisonMemoire.png")

ggplot(perf,aes(x=occu, y=temps, color=struct))+
    geom_point()+geom_smooth()+
    ggtitle("Le temps sur les opérations ")+
    xlab("Occurence")+
    ylab("Temps")+
    facet_grid(rows=vars(struct),cols=vars(test))
ggsave("allComparaisonTimeAnalyse.png")

ggplot(perf,aes(x=occu, y=memoire, color=struct))+
    geom_point()+geom_smooth()+
    ggtitle("La mémoire prise par les opérations ")+
    xlab("Occurence")+
    ylab("Memoire")+
    facet_grid(rows=vars(struct),cols=vars(test))+
    ylim(0,100000)
ggsave("allComparaisonMemoireAnalyse.png")