gta_theme | R Documentation |
This function defines the GTA theme for ggplot. Add it at the end of a ggplot object.
If you want to overwrite certain elements, simply add theme()
to your plot.
gta_theme(
base_size = 12,
base_family = "Open Sans",
base_line_size = base_size / 22,
base_rect_size = base_size / 22,
aspect_ratio = NULL
)
base_size |
base font size, given in pts. |
base_family |
base font family |
base_line_size |
base size for line elements |
base_rect_size |
base size for rect elements |
aspect_ratio |
Here, you can define the aspect ratio of the panel if needed (default is NULL) |
# Create a plot with gta_theme()
df |>
ggplot(aes(x = x, y = y, color = color)) +
geom_line() +
gta_theme() + # add the base theme to your plot
theme(axis.text.x = element_text(angle = 45, color = "red", size = 20)) # if you need to deviate from the theme, simply add changes within a new theme() element
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.