Skip to content

Instantly share code, notes, and snippets.

@delagoya
Created September 3, 2009 13:24
Show Gist options
  • Save delagoya/180288 to your computer and use it in GitHub Desktop.
Save delagoya/180288 to your computer and use it in GitHub Desktop.
# assume you have a file with lots if dates
d <- read.delim('datafile.txt')
# plot the values on Y dates on X
plot(d$webhits, type='l', xaxt='n', xlab='', ylab='', xlim=c(1,length(d$date)))
# draw the x axis
date.labels <- d$date[pretty(1:length(d$date),10) + 1 ]
axis(1,at=pretty(1:length(d$date),10),labels=date.labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment