plot_theme | R Documentation |
Change ggplot text, font, legend and border
plot_theme(
main_text_size = 8,
legend_text_size = 6,
font_type = "sans",
border_thick = 1.5,
remove_grid = TRUE,
remove_border = FALSE,
remove_main_text = FALSE,
remove_legend_text = FALSE,
remove_legend = FALSE
)
main_text_size |
Numeric, main text size |
legend_text_size |
Numeric, legend text size |
font_type |
Character, specify the plot text font family, default is "sans". |
border_thick |
Numeric, border thickness, default is 1. If set 0, remove both border and ticks. |
remove_grid |
Logical, remove background grid lines, default is FALSE. |
remove_border |
Logical, remove border line, default is FALSE. |
remove_main_text |
Logical, remove all axis text, default is FALSE. |
remove_legend_text |
Logical, remove all legend text, default is FALSE. |
remove_legend |
Logical, remove entire legend, default is FALSE. |
ggplot theme
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
plot_theme(font_type = "Times", border_thick = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.