| tscv_cols | R Documentation |
Extract named colors from the tscv color palette as hexadecimal color
codes.
tscv_cols(...)
... |
Character values giving the names of colors to extract. |
tscv_cols() returns the hexadecimal color codes used by the
tscv package. If no color names are supplied, all available colors are
returned.
Available colors are:
"red", "green", "blue", "orange",
"yellow", "light grey", and "dark grey".
A named character vector of hexadecimal color codes.
Other data visualization:
plot_bar(),
plot_density(),
plot_histogram(),
plot_line(),
plot_point(),
plot_qq(),
scale_color_tscv(),
scale_fill_tscv(),
theme_tscv(),
tscv_pal()
# Return all available tscv colors
tscv_cols()
# Return selected colors
tscv_cols("steelblue", "orange", "green")
# Use a tscv color in a plot
library(dplyr)
data <- M4_monthly_data |>
filter(series == "M23100")
plot_line(
data = data,
x = index,
y = value,
title = "M4 Monthly Time Series",
subtitle = "Series M23100",
xlab = "Time",
ylab = "Value",
line_color = tscv_cols("steelblue")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.