visualization | R Documentation |
Functions for data visualization.
theme_clean_light(
base_size = 11,
base_family = "",
base_line_size = base_size/22,
base_rect_size = base_size/22,
half_line = base_size/2,
base_margin = base_size,
primary_colour = "black",
secondary_colour = "grey30",
minor_colour = "#f7f7f7",
bg_colour = "white",
strip_colour = "white"
)
theme_clean_dark(
base_size = 11,
base_family = "",
base_line_size = base_size/22,
base_rect_size = base_size/22,
half_line = base_size/2,
base_margin = base_size,
primary_colour = "white",
secondary_colour = "#f2f2f2",
minor_colour = "#525252",
bg_colour = "#494949",
strip_colour = "grey80"
)
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 |
half_line |
half line |
base_margin |
base margin |
primary_colour |
title and axis colour |
secondary_colour |
text and axis ticks colour |
minor_colour |
major gridlines colour |
bg_colour |
plot background colour |
strip_colour |
strip background colour |
theme_clean_light()
A clean-looking ggplot2 theme, with x axis line and y major gridlines on a white background.
theme_clean_dark()
A clean-looking ggplot2 theme, with x axis line and y major gridlines or axis ticks on a dark grey background.
A ggplot2 theme.
Judith Bourque
## Not run:
p <- ggplot2::ggplot(data = ggplot2::mpg) +
ggplot2::geom_point(mapping = ggplot2::aes(x = displ, y = cty, colour = class)) +
ggplot2::labs(
title = "Look at this graph!",
subtitle = "What a great theme, eh?",
caption = "Data: API Twitter \nCLESSN"
) +
ggplot2::xlab("x axis label") +
ggplot2::ylab("y axis label")
p + theme_clean_light()
p + theme_clean_dark()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.