visualization: Visualize your data

visualizationR Documentation

Visualize your data

Description

[Experimental]

Functions for data visualization.

Usage

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"
)

Arguments

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

Details

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.

Value

A ggplot2 theme.

Author(s)

Judith Bourque

Examples

## 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)

clessn/clessn-verse documentation built on Feb. 18, 2024, 12:42 p.m.