theme_ggcharts: Theme ggcharts

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/theme.R

Description

The default ggcharts theme

Usage

1
2
3
4
5
6
7
theme_ggcharts(
  base_size = 14,
  base_family = "",
  axis = "",
  ticks = "",
  grid = ""
)

Arguments

base_size

numeric. Base font size in pt

base_family

character. Base font family

axis

character. Where to draw an axis line

ticks

character. Where to draw axis ticks

grid

character. Where to draw grid lines

Details

theme_ggcharts is the default theme used when creating any plot with ggcharts.

Value

An object of class theme

Author(s)

Thomas Neitmann

See Also

For more details see the 'theme' vignette: vignette("theme", package = "ggcharts")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ggplot2)
library(dplyr)

scatter <- ggplot(mtcars, aes(hp, mpg)) +
  geom_point(color = "steelblue")

scatter + theme_ggcharts()

scatter + theme_ggcharts(grid = "XY")

scatter + theme_ggcharts(axis = "xy", ticks = "xy")

bar_chart(ggplot2::diamonds, cut) +
  theme_ggcharts(axis = "y", grid = "Y")

column_chart(ggplot2::diamonds, cut) +
  theme_ggcharts(axis = "x", grid = "X")

ggcharts::biomedicalrevenue %>%
  filter(company == "Roche") %>%
  ggplot(aes(year, revenue)) +
  geom_line(color = "steelblue", size = 1) +
  scale_y_continuous(expand = expand_scale(c(0, .05))) +
  theme_ggcharts(grid = "X", axis = "x", ticks = "x")

ggcharts documentation built on July 1, 2020, 11:23 p.m.