adjust_font {tidyplots} | R Documentation |
Adjust font
Description
Adjust font
Usage
adjust_font(plot, fontsize = 7, family = NULL, face = NULL, color = "black")
Arguments
plot |
A |
fontsize |
Font size in points. Defaults to |
family |
Font family |
face |
Font face ("plain", "italic", "bold", "bold.italic") |
color |
A hex color for the stroke color. For example, |
Value
A tidyplot
object.
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")
[Package tidyplots version 0.2.0 Index]