Re: [R] Axis whitout all the row, that contains time

2021-02-14 Thread Rui Barradas
Hello, Sorry, my typo now, see inline. Às 16:56 de 14/02/21, Rui Barradas escreveu: Hello, Please always cc the r-help mailing list, this might be helpful to others in the future. 1. You have a data file using the continental Europe convention of marking the decimals with a comma, therefor

Re: [R] Axis whitout all the row, that contains time

2021-02-14 Thread Rui Barradas
Hello, Please always cc the r-help mailing list, this might be helpful to others in the future. 1. You have a data file using the continental Europe convention of marking the decimals with a comma, therefore you should read the data in with read.csv2: the columns separator is the semi-colo

Re: [R] Axis whitout all the row, that contains time

2021-02-14 Thread Rui Barradas
Hello, Merci pour les donnés, c'est beaucoup mieux comme ça. Create a column of class "POSIXct" listeMesuresPropres$DateHeure <- with(listeMesuresPropres, as.POSIXct(paste(Date., Heure.))) and then plot with this new column, DateHeure as x axis variable. Can you post the entire ggplot cod

Re: [R] Axis whitout all the row, that contains time

2021-02-14 Thread Informatique
Hello, Thank's for your help. i when i try this one geom_line() + scale_x_datetime(date_breaks = "20 secs", date_labels = "H:%M:%S") geom_point() i have an error : Erreur : Invalid input: time_trans works with objects of class POSIXct only it's the reason i

Re: [R] Axis whitout all the row, that contains time

2021-02-14 Thread Rui Barradas
Hello, It's not scale_x_time with arguments breaks and labels. It's scale_x_datetime with arguments date_breaks and date_labels. If you also want the hour displayed in the x axis labels, change the format string in my previous post to scale_x_datetime(date_breaks = "20 secs", date_labels =

Re: [R] Axis whitout all the row, that contains time

2021-02-13 Thread Informatique
Hello, the time are in the first table like that : 10:24:00 and i use this for listeMesuresPropres$Heure. <- hms(listeMesuresPropres$Heure. after time ar like that : 10H 24M 0S and when i use with ggplot scale_x_time(breaks = "20 secs",labels = "%H:%M:%S") it have

Re: [R] Axis whitout all the row, that contains time

2021-02-12 Thread Rui Barradas
Hello, In order to select every 20 s, set the date_breaks = "20 secs", not the breaks. The axis labels are also formatted, with date_labels, standard datetime format strings are used for this. And rotated, not part of the question. # Create some data set.seed(2021) time <- seq(as.POSIXct("202

Re: [R] Axis whitout all the row, that contains time

2021-02-12 Thread John Kane
With a dat.frame "mydata" create a new variable mydata$num mydata$num <- 1:nrow(mydata) new_data <- subset(mydata, num == 10) plot using new_data On Fri, 12 Feb 2021 at 10:35, Informatique < informati...@billard-francois-marie.eu> wrote: > Hello, > > i'm using Rstudio from a few day, and i

[R] Axis whitout all the row, that contains time

2021-02-12 Thread Informatique
Hello, i'm using Rstudio from a few day, and i have some information in a CVS file, take every five second, format of the time is HH:MM:SS. I use the hour on the X axis, but i don't want having all the time print. For example only every 10 values. I think it will be possible with scale_x_date