仅绘制夏威夷群岛

时间:2018-09-10 16:50:03

标签: r ggplot2 ggmap

我只想使用Rstudio绘制夏威夷群岛。我已经尝试过ggmap和ggplot2。有人还有其他建议吗?

library(ggplot2)  
library(maps)  
all_states <- map_data("state")  
p <- ggplot() + geom_polygon(data=all_states, 
                             aes(x=long, y=lat, group = group),
                             color="white", fill="lightgreen" ) + 
                geom_point(  data=mapdata, aes(x=long, y=lat), color="red") + 
                geom_text(   data=mapdata, aes(long, lat, label = mapdata$Location), 
                             hjust = -.10,  size=3, angle = 15, color = "black")

0 个答案:

没有答案