tsm_ggbox | R Documentation |
Create boxplot including original data points.
tsm_ggbox(
data,
xvar = artist,
yvar = year,
label = name,
max_cats = 15,
title = "Album release years",
subtitle = "Boxplots and raw data points",
farben = tmaptools::get_brewer_pal("Dark2", n = max_cats, plot = FALSE)
)
data |
data frame to use for plotting |
xvar |
categorical variable |
yvar |
continuous variable |
label |
a variable that can be used in plotly::ggploty() to label data points |
max_cats |
maximum number of categories to be displayed |
title |
plot title |
subtitle |
plot subtitle |
farben |
vector of colors. Defaults to palette "Dark2" |
ggplot object, so that it can be further manipulated (e. g. apply different theme, theme options)
library(dplyr)
tsm_ggbox(albums)
tsm_ggbox(albums, title = "Release years of albums by selected bands",
subtitle = "")
albums %>%
filter(artist != "Original Soundtrack") %>%
tsm_ggbox()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.