From 6c015fe2cc674635aa04dbb51894ad540bf716ea Mon Sep 17 00:00:00 2001 From: Alberto Fagner Ferreira de Barros Date: Tue, 26 Feb 2013 00:41:42 -0300 Subject: [PATCH] =?UTF-8?q?mudan=C3=A7a=20do=20grafico=20de=20barras=20par?= =?UTF-8?q?a=20linhas=20e=20mudan=C3=A7a=20da=20posi=C3=A7=C3=A3o=20da=20l?= =?UTF-8?q?egenda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "US7 - Analise Sess\303\243oEstudo-Dia.R" | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git "a/US7 - Analise Sess\303\243oEstudo-Dia.R" "b/US7 - Analise Sess\303\243oEstudo-Dia.R" index 47bc94e..4d81e06 100644 --- "a/US7 - Analise Sess\303\243oEstudo-Dia.R" +++ "b/US7 - Analise Sess\303\243oEstudo-Dia.R" @@ -1,17 +1,22 @@ # Codigo gerador do grafico do total de sess�es por dia durante o periodo -# Alberto - vers�o 2.0 (Fevereiro 2013) +# Alberto - vers�o 3.0 (Fevereiro 2013) require(ggplot2) sessoes<-read.csv("dados/tabelaDataSessao.csv") +sessoes<-data.frame(sessoes,1) -p<-ggplot(sessoes,aes(dataDasSessoes,sessoes))+geom_histogram()+labs(x="Datas",y="Total de Sess�es")+ -geom_segment(aes(x = "09/17/2011", y = 0, xend = "09/17/2011", yend = 150,color="09/17/2011 - Prova 01"))+ -geom_segment(aes(x = "10/29/2011", y = 0, xend = "10/29/2011", yend = 150,color="10/29/2011 - Prova 02"))+ -geom_segment(aes(x = "11/26/2011", y = 0, xend = "11/26/2011", yend = 150,color="11/26/2011 - Prova 03"))+ -geom_segment(aes(x = "12/03/2011", y = 0, xend = "12/03/2011", yend = 150,color="12/03/2011 - Prova Final"))+ -scale_colour_manual("Data das Provas", breaks = c("09/17/2011 - Prova 01", "10/29/2011 - Prova 02", "11/26/2011 - Prova 03","12/03/2011 - Prova Final"),values = c("red", "green", "blue","orange"))+ +p<-ggplot(sessoes,aes(dataDasSessoes,sessoes,group=X1))+geom_line()+labs(x="Datas",y="Total de Sess�es")+ +geom_segment(aes(x = "09/17/2011", y = 0, xend = "09/17/2011", yend = 150),colour="red")+ +geom_segment(aes(x = "10/29/2011", y = 0, xend = "10/29/2011", yend = 150),colour="pink")+ +geom_segment(aes(x = "11/26/2011", y = 0, xend = "11/26/2011", yend = 150),colour="blue")+ +geom_segment(aes(x = "12/03/2011", y = 0, xend = "12/03/2011", yend = 150),colour="orange")+ +theme_bw()+ theme(panel.grid.minor.x=element_blank(), panel.grid.major.x=element_blank())+ -theme(axis.ticks = element_blank()) +theme(axis.ticks = element_blank())+ +geom_text(data = NULL, x = 14, y = 145, label = "09/17/2011 - Prova 1",size=4,colour="red")+ +geom_text(data = NULL, x = 14, y = 140, label = "10/29/2011 - Prova 2",size=4,colour="pink")+ +geom_text(data = NULL, x = 14, y = 135, label = "11/26/2011 - Prova 3",size=4,colour="blue")+ +geom_text(data = NULL, x = 14, y = 130, label = "12/03/2011 - Prova Final",size=4,colour="orange") png(filename="us7.png",bg="transparent",width = 580, height = 480)