theme_black: ggplot2 Theme with No Background or Gridlines.

Description Usage Arguments Author(s) References See Also Examples

Description

A ggplot2 theme with no background and no gridlines.

Usage

1
theme_black(base_size = 12, base_family = "")

Arguments

base_size

The size to use for text. Various textual components are scaled off of this value.

base_family

The base font family.

Author(s)

Jon Lefcheck (http://jonlefcheck.net)

References

http://jonlefcheck.net/2013/03/11/black-theme-for-ggplot2-2

See Also

theme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
ggplot(mtcars, aes(factor(cyl))) + geom_bar(fill="white") + theme_black()
dat <- data.frame(y = c(austres), time = time(austres))
ggplot(dat, aes(time, y)) + scale_x_continuous() +
    geom_line(color="lightblue", size=1) + theme_black()

## Not run: 
library(maps)
crimes <- data.frame(state = tolower(rownames(USArrests)), USArrests)
states_map <-map_data("state")

ggplot(crimes, aes(map_id = state)) +
    geom_map(aes(fill = Murder), map = states_map) +
    expand_limits(x = states_map$long, y = states_map$lat) +
    theme_black() +
    scale_fill_gradient(low="grey10", high="white")

## End(Not run)

trinker/plotflow documentation built on May 31, 2019, 9:42 p.m.