You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(sf)
# two arbitrary multipolygons:
p1 <- st_polygon(list(matrix(c(0, 0, 0, 1, 1, 1, 1, 0, 0, 0), ncol = 2, byrow = TRUE)))
mp1 <- c(p1, p1 + c(2, 2))
p2 <- p1 + c(4, 4)
mp2 <- c(p2, p2 + c(2, 2))
# An `sfc` object with only multipolygons plots nicely:
plot(st_sfc(mp1, mp2))
# The fill color of the polygons changes to black when mulitpolygons and polygons are mixed:
plot(st_sfc(mp1, p2))
# Specififaction of the `col` argument still works though:
plot(st_sfc(mp1, p2), col = NA)