Reputation: 11
I'm trying to plot a world map on R but I don't have the version updated for ggplot2. Is there a way of doing it without?
Upvotes: 0
Views: 959
Reputation: 37641
You can get an extremely simple world map with:
library(maps)
map('world', fill = TRUE, col = 2:8, wrap=c(-180,180) )
And a somewhat better map from the mapdata
package
library(mapdata)
map('worldHires', fill=TRUE, col=2:8)
And just for fun, here is a version with prettier colors, a blue ocean and cutting out Antarctica.
RegHR <- map("worldHires", namesonly=TRUE, plot=FALSE)
map('worldHires', fill=TRUE, col=terrain.colors(6), bg="#CCEEFF",
region=RegHR[-grep("Antarctica", RegHR)])
Upvotes: 7