Madhumita
Madhumita

Reputation: 499

Time in years(x axis) shows years in .5 interval - Time Series using R

dsales1156ts<-ts(dsales1156,frequency=365,start=c(2011,6)) # This is my time series created with daily sales data when the first sale day is 6th January 2011.

plot(dsales1156ts)

The graph is as attached below:

enter image description here

The problem is time in x-axis is taken at every .5 years interval. How do I change it to yearly? How do I get the points as 2011 , 2012 , 2013 instead of 2011.0 , 2011.5 , 2012.0 , 2012.5 , 2013 , 2013.5 ?

Upvotes: 0

Views: 728

Answers (1)

arvi1000
arvi1000

Reputation: 9582

Not sure what format your data is in, but you can use the axis() command to adjust options. Lots of other posts on stack about this, such as: Set the intervals of x-axis using r

Upvotes: 0

Related Questions