geomtextpath icon indicating copy to clipboard operation
geomtextpath copied to clipboard

straight argument unknown in geom_textsf()

Open dominicroye opened this issue 2 years ago • 2 comments

I cannot specify the straight argument since it seems unknown for geom_textsf().

library(sf)
library(geomtextpath)
library(tidyverse)


point <- st_point(c(4.351667, 50.846667)) |> 
  st_sfc(crs = 4326) |>
  st_transform(3035)

pointbdf <- st_buffer(point, units::as_units(2500, "km")) |> st_as_sf() |> 
                 st_cast("LINESTRING") |>
                 mutate(label = "dummy")
                 
ggplot(pointbdf, aes(geometry = x, label = label)) + geom_textsf(straight = TRUE)      
Warning message:
In layer_sf(geom = GeomTextsf, data = data, mapping = mapping, stat = stat,  :
  Ignoring unknown parameters: `straight`

dominicroye avatar Feb 22 '23 14:02 dominicroye

Thanks for pointing this out. It also looks as if parse isn't recognised either. These arguments don't seem to be handled by the underlying sf helpers. I'll need to take a look at this and let you know when it's patched.

AllanCameron avatar Feb 22 '23 23:02 AllanCameron

Here are other parameters that are also unrecognized.

Warning message:
In layer_sf(geom = GeomTextsf, data = data, mapping = mapping, stat = stat,  :
  Ignoring unknown parameters: `gap`, `offset`, `text_only`, `rich`, and `remove_long`

glorious1 avatar Jul 12 '23 14:07 glorious1