theme_general_dft | R Documentation |
Applies a standardised DfT theme to a ggplot.
theme_general_dft(
legend_position = "bottom",
base_family = "Arial",
base_size = 14,
base_line_size = 2,
margin_sizes = c(2, 1, 1, 1)
)
legend_position |
the desired legend position. Selects bottom by default. |
base_family |
Font family |
base_size |
The base font size |
base_line_size |
The base line size |
margin_sizes |
The margin size in cm. Takes a list of the four margins in the order top, right, bottom, left. |
This theme has been designed using charting best practice principles.
## Not run:
## Simple line plot using general theme with default options
library(ggplot2)
df <- economics_long[economics_long$variable %in% c("psavert", "uempmed"), ]
# plot
ggplot(df, aes(x=date)) +
geom_line(aes(y=value, col=variable), size = 1) +
theme_general_dft()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.