Re: [R] Labeling Dates of different length on two in axis plot

2019-08-25 Thread Ogbos Okike
Dear Bert and Jim, Here is the code: data <- read.table("CLMX.txt", col.names = c("year", "month", "day", "CLMX")) new.century <- data$year < 50 data$year <- ifelse(new.century, data$year + 2000, data$year + 1900) data$date <- as.Date(ISOdate(data$year, data$month, data$day)) x1 = data$date L

Re: [R] Labeling Dates of different length on two in axis plot

2019-08-25 Thread Ogbos Okike
Dear Jim and Bert, Thank your for looking into this for me. I will try to reproduce a part of my data and the plot I have. Data 1: 53 01 02 -1.28792560381641 53 01 06 -1.1854773963453 53 01 08 -1.55920165458006 53 01 15 -1.29196482429683 53 01 20 -1.06082194329819 53 01 22 -1.15430411152234 53 01

Re: [R] Labeling Dates of different length on two in axis plot

2019-08-25 Thread Bert Gunter
I think you will need to show us your code to get useful help (see the posting guide). A small subset of your data and a reprex may also be needed. R has several different graphics systems, and the answer depends on which you are using. In base graphics, the axis() function (see its Help page) may

Re: [R] Labeling Dates of different length on two in axis plot

2019-08-25 Thread Jim Lemon
Hi Ogbos, Hope things are going well for you. Perhaps this is what you want: date_x1<-seq(as.Date("1953-01-02"),as.Date("2006-11-15"),length.out=8) value_x1<-sample(1000:5000,8) date_x2<-seq(as.Date("1957-07-26"),as.Date("1994-07-17"),length.out=6) value_x2<-sample(0:1000,6) plot(date_x1,value_x1,

[R] Labeling Dates of different length on two in axis plot

2019-08-24 Thread Ogbos Okike
Dear Contributors, I have two dataset of different lengths, each containing year, month, day and counts. After converting the date using as.Date function, I plotted the two dateset on one graph. That was fine. I am, however, having problems with the axis 1 where I am trying to put the dates. Since