我正在使用以下代码从一个shapefile中创建“trial_area”的地图,并覆盖来自第二个shapefile的海岸线和“prod_areas”区域。然后我使用coord_sf将地图缩放到trial_area多边形的st_bbox。但是对于某些区域(请参见下面的示例),轴刻度文本标签会重叠,是否有一种方式可以指定轴刻度标记间隔以避免这种情况(例如纬度为.1,经度为.5)?
poly <- trial_areas %>%
filter(Id==5)
ext <- st_bbox(poly)
plot_SoundOfSleat <- ggplot() +
theme(panel.background = element_rect(fill = 'light blue'),element_line()) +
geom_sf(data=poly)+
geom_sf(data=prod_areas,fill=mycol) +
geom_sf(data = Scot, aes(),
fill = "lightgreen",col="darkgreen") +
coord_sf(xlim = c(ext[1], ext[3]), ylim = c(ext[2], ext[4])) +
ggtitle("Sound of Sleat Trial Area 5") +
geom_sf_text(aes(label = Producti_1), data=prod_areas,size=3,hjust=0, vjust=0) +
labs(x = "Longitude", y= "Latitude")
plot_SoundOfSleat