geom_tiles()
几何对象剪辑几何对象(绘制s(经度,纬度)平滑的拟合值(绘制拟合的值) )?
geom_sf()
如果您想要真正的剪辑,您将无法使用
library(ggplot)
ggplot() +
geom_tile(
data = gam,
aes(
x = longitude,
y = latitude,
fill = .fitted)
) +
geom_sf(
data = country,
fill = NA,
color = "black"
)
)
绘制
geom_tile
层,然后使用the the line the sf countrline the the the the the the the tline用口罩在非国家区域上绘画,但我认为在SF中创建瓷砖网格是非常可取的并使用geom_tile
保留网格的国家部分。
st_difference
data使用了
您没有在您的问题中包含任何数据,因此我创建了一些具有相同名称和结构的数据。
st_intersection