katrinabrock · GitHub

MRE:

library(tinyplot)
tinytheme(
  theme = "minimal",
  tinytheme = "minimal_with_grid",
  "grid" = TRUE
)
tpar("tinytheme")
tinyplot(
  mpg ~ cyl,
  data = mtcars
)

In released version of tinyplot, the above runs without error. I can use tpar to check if my custom theme was applied (vs uncustomized "minimal"). In main ( 49e9259 ), above fails with "Error in get(paste0("theme_", .tinytheme), envir = asNamespace("tinyplot")) : object 'theme_minimal_with_grid' not found.

get(paste0("theme_", .tinytheme), envir = asNamespace("tinyplot"))

I'm aware that tinytheme is not a documented tpar, so I guess I shouldn't expect a stable interface. But it was suggested at least to read it in #556 .

I guess this is a feature request to allow user-defined named themes in some way as properly supported feature.

Read the original on github.com ↗