我在读取shapefile(设防后等)之后创建了一个空间数据框 可以说数据框名称为state_shp
head(state_shp)如下
long lat order hole piece id group State_Name
64727 76.85065 30.87512 64727 FALSE 1 10 10.1 Haryana
64728 76.86594 30.86691 64728 FALSE 1 10 10.1 Haryana
64729 76.87530 30.86977 64729 FALSE 1 10 10.1 Haryana
64730 76.88317 30.87437 64730 FALSE 1 10 10.1 Haryana
64731 76.89213 30.88219 64731 FALSE 1 10 10.1 Haryana
64732 76.90011 30.88449 64732 FALSE 1 10 10.1 Haryana
143451 81.37566 28.16789 143451 FALSE 1 31 31.1 Uttar Pradesh
143452 81.37801 28.17139 143452 FALSE 1 31 31.1 Uttar Pradesh
143453 81.38133 28.17313 143453 FALSE 1 31 31.1 Uttar Pradesh
143454 81.39057 28.17307 143454 FALSE 1 31 31.1 Uttar Pradesh
143455 81.39486 28.17392 143455 FALSE 1 31 31.1 Uttar Pradesh
143456 81.41698 28.17376 143456 FALSE 1 31 31.1 Uttar Pradesh
143457 81.42917 28.17103 143457 FALSE 1 31 31.1 Uttar Pradesh
143458 81.43936 28.16479 143458 FALSE 1 31 31.1 Uttar Pradesh
143459 81.44362 28.16037 143459 FALSE 1 31 31.1 Uttar Pradesh
143460 81.45018 28.15650 143460 FALSE 1 31 31.1 Uttar Pradesh
143461 81.45144 28.14945 143461 FALSE 1 31 31.1 Uttar Pradesh
现在,当我使用以下代码时,它还有更多的行
ggplot()+geom_path(data=state_shp,aes(state_shp$long,state_shp$lat,
group=state_shp$group),color="black")+
facet_wrap(.~State_Name)
我得到的结果是错误的。我不知道哪里出了错