Closed
Description
According to the documentation, the legend of geom_sf should be always showed if show.legend is TRUE.
However, if there is no aesthetics other than geometry, the legend of geom_sf does not appear even if show.legend is TRUE.
Below is an example:
library(ggplot2)
library(sf)
nc <- st_read(system.file("shape/nc.shp", package = "sf"))
ggplot(nc) + geom_sf(show.legend = TRUE)