Consider the following code:
require(zoo)
data <- read.csv(file="summary.csv",sep=",",head=TRUE)
data = zoo(data$compressed, as.Date(data$date))
data <- aggregate(data, identity, tail, 1)
days = seq(start(data), end(data), "day")
data2 = na.locf(merge(data, zoo(,days)))
par(bty = 'n')
plot(data2,xlab='',ylab='entropy (bytes)')
How can one:
- Adjust both the horizontal and vertical limits o the drawn axis to match the start and end of data (as an example, while the y value may vary between 20 and 1525, the axis shows 0 and 1500).
- Increase the horizontal resolution (at least add some minor ticks) when the timeseries spans for a couple of years.
Using:
plot(data2,xlab='',ylab='entropy (bytes)', xaxs = 'i', yaxs = 'i')
I get:

Which is not exactly what I had in mind. The vertical scale doesn't start with the exat minimum (around 25), nor does it end with the exact maximum. The horizontal scale starts and ends in the middle. Hints?
plot()call withaxes = FALSEand then draw the axes usingaxis(side = 2)for the y axis with suitableat, and the x-axis can be drawn usingaxis.Date()as per my answer below. – Gavin Simpson Nov 13 '10 at 22:48