themes: Personalized theme for ggplot2-based graphics

themesR Documentation

Personalized theme for ggplot2-based graphics

Description

  • theme_metan(): Theme with a gray background and major grids.

  • theme_metan_minimal(): A minimalistic theme with half-open frame, white background, and no grid. For more details see ggplot2::theme().

  • transparent_color(): A helper function to return a transparent color with Hex value of "#000000FF"

  • ggplot_color(): A helper function to emulate ggplot2 default color palette.

  • alpha_color(): Return a semi-transparent color based on a color name and an alpha value. For more details see grDevices::colors().

Usage

theme_metan(grid = "none", col.grid = "white", color.background = "gray95")

theme_metan_minimal()

transparent_color()

ggplot_color(n)

alpha_color(color, alpha = 50)

Arguments

grid

Control the grid lines in plot. Defaults to "both" (x and y major grids). Allows also grid = "x" for grids in x axis only, grid = "y" for grid in y axis only, or grid = "none" for no grids.

col.grid

The color for the grid lines

color.background

The color for the panel background.

n

The number of colors. This works well for up to about eight colours, but after that it becomes hard to tell the different colours apart.

color

A color name.

alpha

An alpha value for transparency (0 < alpha < 1).

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com


metan documentation built on March 7, 2023, 5:34 p.m.