Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 1 | % 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{ |
| 7 | theme_ids( |
Marc Kupietz | 590efd0 | 2023-09-01 11:01:08 +0200 | [diff] [blame^] | 8 | base_size = 10, |
Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 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{ |
| 24 | Based on Highcharts ggtheme \link[ggthemes]{theme_hc} |
| 25 | which again is based on the plots in \url{Highcharts JS}. |
| 26 | } |
| 27 | \note{ |
| 28 | Note that here, unlike with the highcharter theme, you have to set the scale |
| 29 | explicitly. |
| 30 | } |
| 31 | \examples{ |
| 32 | library(ggplot2) |
| 33 | library(idsThemeR) |
| 34 | |
| 35 | if (interactive()) { |
| 36 | p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg, |
| 37 | colour = factor(gear))) + facet_wrap(~am) |
| 38 | p + theme_ids() + scale_colour_ids() |
| 39 | p + theme_ids(style = "dark") + |
| 40 | scale_colour_ids("dark") |
| 41 | |
| 42 | dtemp <- 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 | |
| 55 | ggplot(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} |