Skip to content

geom_sf still not processing shape aesthetics when passed as strings #6601

@francisbarton

Description

@francisbarton

The issue raised in #5808 (and apparently fixed) is still not working for me.
I have the latest ggplot2 from CRAN (v3.5.2) which should have the fix in it.

Here's my reprex:

nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) |>
  sf::st_centroid() |>
  suppressWarnings()

ggplot2::ggplot(nc) +
  ggplot2::geom_sf(shape = "diamond filled", size = 8)

ggplot2::ggplot(nc) +
  ggplot2::geom_sf(
    shape = ggplot2:::translate_shape_string("diamond filled"),
    size = 8,
    fill = "grey50"
  )

sessioninfo::package_info("ggplot2", dependencies = FALSE)
#>  package * version date (UTC) lib source
#>  ggplot2   3.5.2   2025-04-09 [1] CRAN (R 4.5.0)

Created on 2025-09-10 with reprex v2.1.1

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