tidyplots_options | R Documentation |
Control the settings for formatting tidyplots globally.
tidyplots_options(
width = NULL,
height = NULL,
unit = NULL,
dodge_width = NULL,
my_style = NULL
)
width |
Width of the plot area. The default ( |
height |
Height of the plot area. The default ( |
unit |
Unit of the plot area width and height. The default ( |
dodge_width |
For adjusting the distance between grouped objects.
The default ( |
my_style |
Styling function to apply to the plot. The default ( |
The old options invisibly
# Define custom style
my_style <- function(x) x |>
adjust_colors(colors_discrete_candy) |>
adjust_font(family = "mono")
# Set tidyplots options
tidyplots_options(
width = 3,
height = 4,
unit = "cm",
dodge_width = 1,
my_style = my_style
)
# Plot
study |>
tidyplot(x = group, y = score, color = dose) |>
add_mean_bar()
# Reset tidyplots options
tidyplots_options()
# Same plot
study |>
tidyplot(x = group, y = score, color = dose) |>
add_mean_bar()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.