adjust_font | R Documentation |
Adjust font
adjust_font(plot, fontsize = 7, family = NULL, face = NULL, color = "black")
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, |
A tidyplot
object.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.