【发布时间】:2015-10-20 15:21:42
【问题描述】:
当我使用 ggplot2::ggplot() 使用 shapefile 创建地图时,我遇到了小特征与大特征重叠的问题。请注意image of the Problem: ggplot overlays the small county by the bigger one。
请将此shapefile 用作输入数据。
load("~/Germany_Bremen_LowerSax_NUTS1.Rdata") # Please use input data mentioned above
library(ggplot2)
plot(shp.nuts.test) # normal plot with visible borders.
shp.f <- fortify(shp.nuts.test)
Map <- ggplot(shp.f, aes(long, lat, group = group, fill = id))+
geom_polygon()
Map
是否有可能在 ggplot 中更改 shapefile 的绘图顺序?
任何帮助表示赞赏!谢谢!
【问题讨论】:
标签: r ggplot2 spatial shapefile