Skip to content

Instantly share code, notes, and snippets.

@hoffmanc
Created December 23, 2011 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoffmanc/1514739 to your computer and use it in GitHub Desktop.
Save hoffmanc/1514739 to your computer and use it in GitHub Desktop.
asdf.r
for(i in unique(mcg$runid)) {
png(paste("plots/greater_than_5_meters/",sprintf("%02d",i),".png",sep=""), width=1024, height=768)
df2 <- mcg[mcg$runid == i & mcg$distance > 5,] # remove the second condition for the "all" plots
plot(df2$lon.y, df2$lat.y, cex=0.1)
lines(c(df2$lon.x,df2$lon.y),c(df2$lat.x,df2$lat.y),col=1 + df2$runid %% 31)
title(main=paste("RUN", i), col.main=1+i%%31, font.main=3)
dev.off()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment