mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
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:
parent
2d062e0ac5
commit
6c850847b7
21 changed files with 1110 additions and 251 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue