Ok, took me a while, but I figured it out. Because my running mean had less years than my standard rainfall graph, when I overlaid the running mean onto the rainfall it was trying to stretch out. So I just plotted both onto the same graph., like so:
barplot(Ann,main=title, xlab="Year",ylab="Rainfall (mm)", ylim=c(0,ymax),col="blue",space=0) cp<-barplot(new[,2],space=0,col=NA,border=NA,names.arg=NA,add=T) lines(cp,c(new[,2]),lwd=2) #"new" is the graph I made using the running mean rainfall data tabulated with the full year set. -- View this message in context: http://n4.nabble.com/prompts-and-running-means-tp1475403p1561105.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.