From d6aca63396b6eca139672aa1caed7fbd5a8965bf Mon Sep 17 00:00:00 2001 From: Sierra Johnson Date: Thu, 15 Aug 2024 12:03:02 -0700 Subject: [PATCH] Add translate_string_shape to GeomSf. Fixes #5808 --- R/geom-sf.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/geom-sf.R b/R/geom-sf.R index c6298e4b3a..457b8c272d 100644 --- a/R/geom-sf.R +++ b/R/geom-sf.R @@ -200,6 +200,9 @@ GeomSf <- ggproto("GeomSf", Geom, if (!inherits(coord, "CoordSf")) { cli::cli_abort("{.fn {snake_class(self)}} can only be used with {.fn coord_sf}.") } + if (is.character(data$shape)) { + data$shape <- translate_shape_string(data$shape) + } data <- coord$transform(data, panel_params)