theme_blackapa: A ggplot2 theme with no background and no gridlines.

View source: R/plot.R

theme_blackapaR Documentation

A ggplot2 theme with no background and no gridlines.

Description

A ggplot2 theme with no background and no gridlines.

Usage

theme_blackapa(plot.box = TRUE, lab.size = 18, text.size = 16)

Arguments

plot.box

logical. If TRUE a full box surrounds the plot area. If FALSE only the x and y axis are shown.

lab.size

default 18

text.size

default 16

Author(s)

Jon Lefcheck (http://jonlefcheck.net) Jerry modified from trinker/plotflow

References

http://jonlefcheck.net/2013/03/11/black-theme-for-ggplot2-2 https://gist.github.com/jslefche/eff85ef06b4705e6efbc

See Also

theme

Examples

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)

jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.