# NOT RUN {
data(svpdx)
# plot
plot(svpdx$pdx, type = "l", xaxt = "n", xlab = "Time", ylab = "Return")
# add x-axis
svpdx$rdate<-format(svpdx$date, format = "%b %Y")
mth <- unique(svpdx$rdate)
qtr <- mth[seq(1,length(mth),3)]
axis(1, at = match(qtr, svpdx$rdate), labels = qtr, cex.axis = 0.75)
axis(1, at = match(mth, svpdx$rdate), labels = FALSE, tcl = -0.2)
# }
Run the code above in your browser using DataLab