Skip to content

Point symbols do not appear in the legend [geom_sf] #3572

Closed
@kadyb

Description

@kadyb

I chose point symbols, they appeared on the map, but didn't appear in the legend.

library("sf")
library("ggplot2")
df = data.frame(x = 1:2, y = 1:2, val = 3:4, shape = factor(1:2))
df = st_as_sf(df, coords = c("x", "y"), crs = 27700)

ggplot(df) +
   geom_sf(aes(color = val, shape = shape))

Imgur

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions