search for: scale_x_datetime

Displaying 7 results from an estimated 7 matches for "scale_x_datetime".

2009 Dec 14
0
ggplot : scale_x_datetime issues
Dear R users, My immediate problem is that I do not seem to understand how to use the function scale_x_datetime function in ggplot. My deeper problem is that I don?t understand the use of the POSIXct class. ? My data looks like like the following : T????????? val 2009-11-04 23:59:57?? 972.357117???? 2009-11-05 00:02:21?? 969.389221???? 2009-11-05 00:04:45?? 868.817749???? 2009-11-05 00:07:09?? 805.593079?...
2011 Feb 10
1
Ggplot: free x-scales in a facet-grid
...s the problem. The most data are between the periode 01/12/2010 and 31/01/2011. But there are some outliers, going back to 2003. Now I would like to split the plot in 2 (based on the index 'pos', split date = 01/12/2010), so the left part of the plot are the time values before this date (scale_x_datetime major = 1 year), and the right part of the plot are the time values after this date (scale_x_datetime major=1 day). Hereby also the R-code (simplified): ggplot(data_plot.melt,aes(timevalue,ID)) + geom_point(aes(groups=timetype,colour=timetype,shape=timetype)) + facet_grid(type ~pos,scales="f...
2016 Sep 06
2
Ayuda con gráfico típico de histograma más linea
...ot;) > ft$Miles <- as.numeric(gsub("\\.", "", as.character(ft$Miles))) > ft$Share <- as.numeric(gsub("\\,", ".", as.character(ft$Share))) > > ggbar <- ggplot(ft, aes(x = hora, y = frec)) + > geom_area(fill= "gray") + > scale_x_datetime(date_breaks = "5 mins", date_labels = "%H:%M") + > theme(panel.background = element_rect(fill = "white")) + > scale_y_continuous(limits=c(0,1500)) + > labs(x = "Minutos", y = "Tweets") + # Etiquetas o títulos de los ejes > theme(...
2016 Sep 03
2
Ayuda con gráfico típico de histograma más linea
...eader = T, sep = ";", dec = ",") > datos$Miles <- as.numeric(gsub("\\.", "", as.character(datos$Miles))) > > datos$hora <- strptime(datos$hora, format = "%H:%M") > > ggplot(datos, aes(x = hora, y = Miles)) + geom_line() + > scale_x_datetime(date_breaks = "15 mins", date_labels = "%H:%M") > > > Además, en aes no hay que hacer referencia a la tabla. Expresiones como > > ggplot(datos, aes(x = datos$hora, y = datos$Miles)) + ... > > son innecesariamente redundantes. > > Salud, > > Carlo...
2010 Nov 19
0
Ggplot and irregular timeseries
...dex(rets))%in%c('Saturday','Sunday'),] rets.m<-data.frame(index(rets),rets,check.names=F) colnames(rets.m)<-c('Date','Rets') rets.m<-melt(rets.m,id.vars=c('Date','Rets')) ggplot(data=rets.m,aes(Date,Rets))+geom_bar(stat="identity")+scale_x_datetime(major = freqprint, format='%m/%d') Thanks in advance for your help/patience and my bad English. Kind regards, Alex
2016 Sep 03
2
Ayuda con gráfico típico de histograma más linea
...t;Downloads/pec.csv", header = T, sep = ";", dec = ",") datos$Miles <- as.numeric(gsub("\\.", "", as.character(datos$Miles))) datos$hora <- strptime(datos$hora, format = "%H:%M") ggplot(datos, aes(x = hora, y = Miles)) + geom_line() + scale_x_datetime(date_breaks = "15 mins", date_labels = "%H:%M") Además, en aes no hay que hacer referencia a la tabla. Expresiones como ggplot(datos, aes(x = datos$hora, y = datos$Miles)) + ... son innecesariamente redundantes. Salud, Carlos J. Gil Bellosta http://www.datanalytics.com El...
2016 Sep 02
2
Ayuda con gráfico típico de histograma más linea
Y bueno, algo más bonito sí que queda con ggplot... #--------------- datIn <- read.csv("pec.csv", header = TRUE, sep = ";", dec = ",") library(ggplot2) lab_x_idx <- c(1, round(nrow(datIn)/2, 0), nrow(datIn)) lab_x <- as.vector(datIn$hora[ lab_x_idx]) fre_gg <- ggplot( datIn, aes( x = 1:nrow(datIn), y = frec)) + geom_bar(stat =