Adjust font
Arguments
- plot
A
tidyplot
generated with the functiontidyplot()
.- fontsize
Font size in points. Defaults to
7
.- family
Font family
- face
Font face ("plain", "italic", "bold", "bold.italic")
- color
A hex color for the stroke color. For example,
"#FFFFFF"
for white.
Examples
# Plot without adjustments
study %>%
tidyplot(x = treatment, y = score, color = treatment) %>%
add_data_points_beeswarm() %>%
add_mean_bar(alpha = 0.4) %>%
add_sem_errorbar()
# Increase font size
study %>%
tidyplot(x = treatment, y = score, color = treatment) %>%
add_data_points_beeswarm() %>%
add_mean_bar(alpha = 0.4) %>%
add_sem_errorbar() %>%
adjust_font(fontsize = 16)
# Change font family
study %>%
tidyplot(x = treatment, y = score, color = treatment) %>%
add_data_points_beeswarm() %>%
add_mean_bar(alpha = 0.4) %>%
add_sem_errorbar() %>%
adjust_font(family = "mono")
# Change font face
study %>%
tidyplot(x = treatment, y = score, color = treatment) %>%
add_data_points_beeswarm() %>%
add_mean_bar(alpha = 0.4) %>%
add_sem_errorbar() %>%
adjust_font(face = "bold")