[R] How do I edit the x-axis on a time series plot?

Philip Turk afpjt at uaa.alaska.edu
Wed Dec 21 05:36:55 CET 2005


I am merely trying to reproduce Figure 1.2 of Chris Chatfield's 6th 
edition of his The Analysis of Time Series: An Introduction (page 2). 
The S-PLUS code is on pages 305-306. I am almost there but I am having a 
heck of a time trying to modify and change the x-axis per the book. The 
book shows the x-axis with 10 tick marks, correctly positioned, and 
labeled "Jan 53", ..., "Jan 62". I have not provided the data for the 
sake of brevity although it is readily available at 
http://www.bath.ac.uk/~mascc/Recife.TS

Can anyone help?

recife <- as.vector(t(recife))<>
RecfS <- ts(recife, start = c(1953,1), frequency = 12) <>
plot(RecfS, ylab = “Temperature (deg C)”, xlab = “Year”, main = “Average 
air temperature (deg C) at Recife, Brazil, in successive months from 
1953 to 1962”, adj = 0.5)

Thanks,

Philip Turk
<>




More information about the R-help mailing list