Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. month<-c("2010-08-01", "2010-09-01", "2010-10-01", "2010-12-01", "2011-01-01", "2011-02-01",
  2. "2011-03-01", "2011-04-01", "2011-05-01", "2011-06-01", "2011-07-01", "2011-09-01",
  3. "2011-11-01", "2012-01-01", "2012-02-01", "2012-03-01", "2012-05-01", "2012-07-01",
  4. "2012-08-01")
  5. prevalence<-c(10,7.5,5.2,3.5,6.4,2.7,5.8,13.2,4.3,4.7,6.4,4.4,5.2,3.3,1.0,3.1,9.9,33.3,1.0)
  6. df<-data.frame(month, prevalence)
  7. df$month<-as.Date(df$month)
  8. plot(df$month, df$prevalence,lwd = 1.8, ylim=c(0,40),pch=16, bty='n', xaxt='n',
  9. ylab="Prevalence (%)", xlab="Month",col='black',cex=1,cex.lab=1.0,cex.axis=1.0)
  10. at <- seq(from = min(d$month), to = max(d$month), by = "month") # produces a regular sequence of dates
  11. axis.Date(side = 1, at = at, labels = FALSE, tck=-0.04)
  12. axis(side=2, at=c(0,10,20,30,40,50), labels=c("", "", "", "", "", ""), tck=-0.04)
  13. lines(df$month, df$prevalence, col='black', lwd=1.8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement