Skip to content

Named user-defined themes not allowed in main (allowed in released version) #579

@katrinabrock

Description

@katrinabrock

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions