feat: added option to choose color palettes for all available plots. this includes a custom function to generate colors from several palettes as well as a select function to include color previews.

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-03-24 12:04:54 +01:00
commit 6c850847b7
No known key found for this signature in database
21 changed files with 1110 additions and 251 deletions

View file

@ -9,8 +9,12 @@ plot_sankey_single(
pri,
sec,
color.group = c("pri", "sec"),
color.palette = "viridis",
colors = NULL,
missing.level = "Missing",
default.color = "#2986cc",
box.color = "#1E4B66",
na.color = "grey80",
...
)
}
@ -44,4 +48,10 @@ mtcars |>
stRoke::trial |>
default_parsing() |>
plot_sankey_single("diabetes", "hypertension")
# stRoke::trial |> plot_sankey_single("mrs_1", "mrs_6", color.palette="magma")
# stRoke::trial |> plot_sankey_single("active", "male")
# stRoke::trial |> plot_sankey_single("diabetes", "active", color.group="sec")
# stRoke::trial |> plot_sankey_single("active", "diabetes", color.group="sec", color.palette="topo")
}