Skip to content

Pass manual colors to palette #324

@grantmcdermott

Description

@grantmcdermott

It feels like this sort of functionality should be supported.

library(tinyplot)
library(palmerpenguins)

tinytheme("clean2", palette.qualitative = c("darkorange","purple","cyan4"))

plt(
  bill_depth_mm ~ bill_length_mm | species, penguins,
  pch = "by",
  alpha = 0.8
)
#> Error in if (!is.na(pal_match)) {: the condition has length > 1

Similarly, I know we pass these manual colours via the col argument, but it still feels like this should work too.

tinytheme("clean2")
plt(
  bill_depth_mm ~ bill_length_mm | species, penguins,
  pch = "by",
  alpha = 0.8,
  palette = c("darkorange","purple","cyan4")
)
#> Error in `[[<-`(`*tmp*`, which(names(args) == ""), value = NULL): recursive indexing failed at level 2

Created on 2025-02-24 with reprex v2.1.1

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