Skip to content

Commit

Permalink
Grafico total sessoes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMenezes committed Mar 27, 2013
1 parent 42d177e commit ff873a3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion US22 - Graficos Resultados Artigo.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Gerar os gráficos dos resultados para o artigo
# Andrey Menezes e Iury Gregory LA2.0 (Março 2013)
require(ggplot2)

library(plyr)
library(ggplot2)
library(scales)

dados = read.csv("dados/TableSessionLength.csv")

Expand Down Expand Up @@ -89,3 +92,41 @@ dev.off()
pdf("TempoTotalDeEstudoEmHoras.pdf", bg="transparent", width = 5.5, height = 3.5)
print(grafico.tempo)
dev.off()



#Numero Total de Submissoes pelo tempo
dados2 = read.csv("dados/TableSessionLength.csv",header=T)
dados2$data.hora<-strptime(dados2$lastSubmission,"%Y-%m-%d")

df <- count(dados2,"data.hora")

provas_data = c("2011-09-17","2011-10-29","2011-11-26","2011-12-03")
Avaliacao = c("Avaliação 1", "Avaliação 2","Avaliação 3","Avaliação Final")

grafico<- ggplot(df, aes(x=as.Date(data.hora),y=freq)) +
geom_line()+
labs(x = "Datas", y = "Número Total de Sessões") +
scale_x_date(breaks = "2 week",labels = date_format("%d/%m"))+
scale_y_continuous(limits=c(0,150)) +
theme_bw()+
geom_segment(aes(x=as.Date(provas_data), y=0, xend=as.Date(provas_data), yend=140, linetype=Avaliacao), size = 0.7)+
theme(legend.position = c(0.14, 0.8), legend.title = element_blank(),legend.text=element_text(size=10))


grafico2<- ggplot(df, aes(x=as.Date(data.hora),y=freq)) +
geom_line()+
labs(x = "Datas", y = "Número Total de Sessões") +
scale_x_date(breaks = "2 week",labels = date_format("%d/%m"))+
scale_y_continuous(limits=c(0,150)) +
theme_bw()+
geom_segment(aes(x=as.Date(provas_data), y=0, xend=as.Date(provas_data), yend=140, linetype=Avaliacao), size=0.7)+
theme(legend.position = c(0.125, 0.82), legend.title = element_blank(),legend.text=element_text(size=8))

png(filename = "Grafico_us7_totalSessoes.png", width = 550, height = 350)
print(grafico)
dev.off()

pdf("Grafico_us7_totalSessoes.pdf", width = 5.5, height = 3.5)
print(grafico2)
dev.off()
Binary file added artigo/Grafico_us7_totalSessoes.pdf
Binary file not shown.
Binary file added artigo/Grafico_us7_totalSessoes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff873a3

Please sign in to comment.