theme_UBA.Rd
A ggplot2 theme based on the Umweltbundesamt corporate design.
theme_UBA(
base_size = 11,
base_family = "",
base_color = "black",
axis_title_bold = TRUE,
axis_title_just = "cc",
ticks = FALSE,
grid_x = TRUE,
grid_y = TRUE,
grid_color = "black",
grid_linetype = "solid",
facette_distance = 1,
facette_box = TRUE,
facette_box_color = "black",
title_size = 12,
title_margin = margin(b = 10),
subtitle_size = 9,
subtitle_margin = margin(b = 10),
axistext_size = 10,
is_subplot = FALSE,
legend_custom_bottom = FALSE
)
Base font size, given in pts.
Base font family. Should be Calibri, but is not set as default.
Base color for text and lines
Should axis titles be bold?
Justification of axis titles. rt
translates to "right" (x-axis) "top" (y-axis).
Should ticks be drawn on the axes?
Should there be major grid lines for the x-axis?
Should there be major grid lines for the y-axis?
Color of the grid lines
Linetype of the grid lines
Distance between facettes
Should a rectangle be drawn around each facette?
Color of the rectangle around each facette
Title font size, given in pts.
Margin around tile
Subtitle font size, given in pts.
Margin around subtitle
Axis text font size, given in pts.
If TRUE
, font sizes and margins of title, subtitle and axis text are decreased. This is useful if multiple plots are to be combined.
If TRUE
, the legend is formatted in a specific way at the bottom of the plot
library(ggplot2)
p1 <- ggplot(data = PlantGrowth) +
aes(y = weight, x = group, fill = group) +
geom_bar(stat = "summary", fun = "mean")
BioMathR::palette_getset("UBA")
#> gruen dunkelgruen blau dunkelblau flieder
#> "#54ba4f" "#097f36" "#069edb" "#015e85" "#985ca6"
#> dunkelflieder fuchsia dunkelfuchsia ocker dunkelocker
#> "#5b2e67" "#d12e69" "#7e013e" "#fdb912" "#d68119"
#> hellgrau dunkelgrau
#> "#d1d2d4" "#4d4d4f"
p1
p1 + BioMathR::theme_UBA()