Skip to content

Instantly share code, notes, and snippets.

@dgerlanc
Last active June 28, 2018 00:02
Show Gist options
  • Select an option

  • Save dgerlanc/eec1a74d671baeb22ddb30c0f6de9e28 to your computer and use it in GitHub Desktop.

Select an option

Save dgerlanc/eec1a74d671baeb22ddb30c0f6de9e28 to your computer and use it in GitHub Desktop.
Simple US map with state borders and capitals
library(mapdata)
data(us.cities)
map("state", col="gray90", fill=TRUE, lwd=0.1, mar=c(0,0,0,0), xlim=c(-127,-65))
map("worldHires", "Canada", xlim=c(-127,-110), ylim=c(48,64), col="gray95", fill=TRUE, add=TRUE)
map("worldHires","Mexico", xlim=c(-127,-110), ylim=c(28,45), col="gray95", fill=TRUE, add=TRUE)
points(gt$long, gt$lat, cex=pt_scale, pch=19, col=MAP_BLACK)
map.cities(us.cities, minpop=5e5, label=TRUE, pch=19, col='red')
title("Locations of Github Users", line=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment