5.2 plot methods for sf objects

Let’s first get two sf object:

bel1_sf <- st_as_sf(bel1)
bel2_sf <- st_as_sf(bel2)

Let’s try a simple plot.

plot(bel1_sf)
#R>  Warning: plotting the first 9 out of 10 attributes; use max.plot = 10 to plot
#R>  all

It actually plots one map per variable and colors the polygon according to the values. To obtain something similar to what is found in sp, an sfc object must be used:

plot(st_geometry(bel1_sf), lwd = 1.5, col = "grey85")
# same as :
# plot(bel1_sf$geometry, lwd = 1.5, col = "grey85")
plot(st_geometry(bel2_sf), lwd = .5, add = TRUE)