I have a couple spatial shape files with various public transport routes and I would like to make a map using ggplot2
and sf
libraries. The issue h
We can use the argument show.legend
from geom_sf
here.
ggplot() +
geom_sf(data= simple.lines.sf, aes(colour = as.factor(id)), show.legend = "line")
Description of show.legend
from ?geom_sf
logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. You can also set this to one of "polygon", "line", and "point" to override the default legend.