blob: 7f641645297faa502180fa03cc91200d23a8be1b [file] [log] [blame]
Marc Kupietz52144812020-12-14 23:41:56 +01001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/ggplot-theme.R
3\name{theme_ids}
4\alias{theme_ids}
5\title{IDS Theme for ggplot2}
6\usage{
7theme_ids(
8 base_size = 14,
9 base_family = idsBaseFontFamily,
10 style = c("default", "light", "dark"),
11 bgcolor = NULL
12)
13}
14\arguments{
15\item{base_size}{base font size, given in pts.}
16
17\item{base_family}{base font family}
18
19\item{style}{\code{'light'}, \code{'dark'}.}
20
21\item{bgcolor}{Deprecated}
22}
23\description{
24Based on Highcharts ggtheme \link[ggthemes]{theme_hc}
25which again is based on the plots in \url{Highcharts JS}.
26}
27\note{
28Note that here, unlike with the highcharter theme, you have to set the scale
29explicitly.
30}
31\examples{
32library(ggplot2)
33library(idsThemeR)
34
35if (interactive()) {
36p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg,
37 colour = factor(gear))) + facet_wrap(~am)
38p + theme_ids() + scale_colour_ids()
39p + theme_ids(style = "dark") +
40 scale_colour_ids("dark")
41
42dtemp <- data.frame(Months = factor(rep(substr(month.name, 1, 3), 4),
43 levels = substr(month.name, 1, 3)),
44 City = rep(c("Tokyo", "New York", "Berlin", "London"),
45 each = 12),
46 Temperature = c(7.0, 6.9, 9.5, 14.5, 18.2, 21.5,
47 25.2, 26.5, 23.3, 18.3, 13.9, 9.6,
48 -0.2, 0.8, 5.7, 11.3, 17.0, 22.0,
49 24.8, 24.1, 20.1, 14.1, 8.6, 2.5,
50 -0.9, 0.6, 3.5, 8.4, 13.5, 17.0,
51 18.6, 17.9, 14.3, 9.0, 3.9, 1.0,
52 3.9, 4.2, 5.7, 8.5, 11.9, 15.2,
53 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
54
55ggplot(dtemp, aes(x = Months, y = Temperature, group = City, color = City)) +
56 geom_line() +
57 geom_point(size = 1.1) +
58 ggtitle("Monthly Average Temperature", subtitle="Source: WorldClimate.com") +
59 theme_ids() +
60 scale_colour_ids()
61
62}
63
64}
65\references{
66\link[ggthemes]{theme_hc}
67
68\url{http://www.highcharts.com/demo/line-basic}
69
70\url{https://github.com/highslide-software/highcharts.com/tree/master/js/themes}
71}
72\concept{themes ids}