Add ggplot2 support und bump to v0.2.0
Change-Id: Iee69051bc64fb9fbde55bbea61c7e892ff95229d
diff --git a/man/figures/Readme-Example-2.png b/man/figures/Readme-Example-2.png
new file mode 100644
index 0000000..c3a2359
--- /dev/null
+++ b/man/figures/Readme-Example-2.png
Binary files differ
diff --git a/man/figures/Readme-Example-3.png b/man/figures/Readme-Example-3.png
new file mode 100644
index 0000000..e97b0d8
--- /dev/null
+++ b/man/figures/Readme-Example-3.png
Binary files differ
diff --git a/man/hc_theme_ids_dark.Rd b/man/hc_theme_ids_dark.Rd
index 2620594..162a64c 100644
--- a/man/hc_theme_ids_dark.Rd
+++ b/man/hc_theme_ids_dark.Rd
@@ -7,12 +7,10 @@
hc_theme_ids_dark(
fontFamily = "Fira Sans Condensed",
fontSize = "medium",
- textColor = "#E0E0E3",
- lowContrastColor = "#707073",
- highContrastColor = "#F0F0F3",
- palette = c("#EB7C31", "#1F77B4", "#2CA02C", "#D62728", "#9467BD", "#8C564B",
- "#E377C2", "#7F7F7F", "#BCBD22", "#17BECF", "#AEC7E8", "#FFBB78", "#98DF8A",
- "#FF9896", "#C5B0D5", "#C49C94", "#F7B6D2", "#C7C7C7", "#DBDB8D", "#9EDAE5"),
+ textColor = textColorDark,
+ lowContrastColor = lowContrastColorDark,
+ highContrastColor = highContrastColorDark,
+ palette = idsPalette,
backgroundColor = list(linearGradient = list(x1 = 0, y1 = 1, x2 = 1, y2 = 0), stops =
list(list(0, "#2a2a2b"), list(1, "#3e3e3e"))),
titleColor = textColor,
diff --git a/man/hc_theme_ids_light.Rd b/man/hc_theme_ids_light.Rd
index fec68e2..80b8107 100644
--- a/man/hc_theme_ids_light.Rd
+++ b/man/hc_theme_ids_light.Rd
@@ -7,7 +7,36 @@
hc_theme_ids_light(...)
}
\arguments{
-\item{...}{named arguments to modify the theme}
+\item{...}{
+ Arguments passed on to \code{\link[=hc_theme_ids_dark]{hc_theme_ids_dark}}
+ \describe{
+ \item{\code{fontFamily}}{font family}
+ \item{\code{fontSize}}{default font size}
+ \item{\code{textColor}}{default text color}
+ \item{\code{lowContrastColor}}{color with low contrast to background}
+ \item{\code{highContrastColor}}{color with high contrast to background}
+ \item{\code{palette}}{array of colors to be used for different series}
+ \item{\code{backgroundColor}}{background color}
+ \item{\code{titleColor}}{color of the title text}
+ \item{\code{subtitleColor}}{color of the subtitle text}
+ \item{\code{gridLineColor}}{color of grid lines}
+ \item{\code{axisLabelColor}}{color of the axis labels}
+ \item{\code{axisLineColor}}{color of the axis lines}
+ \item{\code{minorGridLineColor}}{color of minor grid lines}
+ \item{\code{tickColor}}{color of axis ticks}
+ \item{\code{axisTitleColor}}{color of axis titles}
+ \item{\code{tooltipBackgroundColor}}{background color for tool tips}
+ \item{\code{tooltipColor}}{foreground color for tool tips}
+ \item{\code{dataLabelColor}}{color of data point labels}
+ \item{\code{boxplotFillColor}}{color for box plot fills}
+ \item{\code{candlestickColor}}{color the candle stick part of error bars}
+ \item{\code{errorbarColor}}{error bar color}
+ \item{\code{legendColor}}{series legend label color}
+ \item{\code{legendHoverColor}}{mouse over series legend label color}
+ \item{\code{legendHiddenColor}}{hidden series legend label color}
+ \item{\code{creditsColor}}{color of the credits}
+ \item{\code{burgerMenuBackground}}{burger menu background color}
+ }}
}
\description{
See \code{\link{hc_theme_ids_dark}} for further documentation.
diff --git a/man/hc_theme_ids_mono.Rd b/man/hc_theme_ids_mono.Rd
index 5ce70cb..fb4a4dc 100644
--- a/man/hc_theme_ids_mono.Rd
+++ b/man/hc_theme_ids_mono.Rd
@@ -7,7 +7,36 @@
hc_theme_ids_mono(...)
}
\arguments{
-\item{...}{named arguments to modify the theme}
+\item{...}{
+ Arguments passed on to \code{\link[=hc_theme_ids_dark]{hc_theme_ids_dark}}
+ \describe{
+ \item{\code{fontFamily}}{font family}
+ \item{\code{fontSize}}{default font size}
+ \item{\code{textColor}}{default text color}
+ \item{\code{lowContrastColor}}{color with low contrast to background}
+ \item{\code{highContrastColor}}{color with high contrast to background}
+ \item{\code{palette}}{array of colors to be used for different series}
+ \item{\code{backgroundColor}}{background color}
+ \item{\code{titleColor}}{color of the title text}
+ \item{\code{subtitleColor}}{color of the subtitle text}
+ \item{\code{gridLineColor}}{color of grid lines}
+ \item{\code{axisLabelColor}}{color of the axis labels}
+ \item{\code{axisLineColor}}{color of the axis lines}
+ \item{\code{minorGridLineColor}}{color of minor grid lines}
+ \item{\code{tickColor}}{color of axis ticks}
+ \item{\code{axisTitleColor}}{color of axis titles}
+ \item{\code{tooltipBackgroundColor}}{background color for tool tips}
+ \item{\code{tooltipColor}}{foreground color for tool tips}
+ \item{\code{dataLabelColor}}{color of data point labels}
+ \item{\code{boxplotFillColor}}{color for box plot fills}
+ \item{\code{candlestickColor}}{color the candle stick part of error bars}
+ \item{\code{errorbarColor}}{error bar color}
+ \item{\code{legendColor}}{series legend label color}
+ \item{\code{legendHoverColor}}{mouse over series legend label color}
+ \item{\code{legendHiddenColor}}{hidden series legend label color}
+ \item{\code{creditsColor}}{color of the credits}
+ \item{\code{burgerMenuBackground}}{burger menu background color}
+ }}
}
\description{
See \code{\link{hc_theme_ids_dark}} for further documentation.
diff --git a/man/ids_pal.Rd b/man/ids_pal.Rd
new file mode 100644
index 0000000..15e0c3e
--- /dev/null
+++ b/man/ids_pal.Rd
@@ -0,0 +1,14 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/idsThemeR.R
+\name{ids_pal}
+\alias{ids_pal}
+\title{IDS color palette based on the d3 color palette}
+\usage{
+ids_pal()
+}
+\description{
+IDS color palette based on the d3 color palette
+}
+\references{
+\url{https://github.com/d3/d3}
+}
diff --git a/man/scale_ids.Rd b/man/scale_ids.Rd
new file mode 100644
index 0000000..f45be02
--- /dev/null
+++ b/man/scale_ids.Rd
@@ -0,0 +1,30 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/ggplot-theme.R
+\name{scale_colour_ids}
+\alias{scale_colour_ids}
+\alias{scale_color_ids}
+\alias{scale_fill_ids}
+\title{IDS color and fill scales}
+\usage{
+scale_colour_ids(palette = "default", ...)
+
+scale_color_ids(palette = "default", ...)
+
+scale_fill_ids(palette = "default", ...)
+}
+\arguments{
+\item{palette}{A palette function that when called with a single integer
+argument (the number of levels in the scale) returns the values that they should take.}
+
+\item{...}{
+ Arguments passed on to \code{\link[ggthemes:scale_gdocs]{ggthemes::scale_colour_gdocs}}, \code{\link[ggthemes:scale_gdocs]{ggthemes::scale_colour_gdocs}}
+ \describe{
+ \item{\code{}}{}
+ }}
+}
+\description{
+Colour and fill scales which use the palettes in
+\code{\link{ids_pal}()} and are meant for use with
+\code{\link{theme_ids}()}.
+}
+\concept{colour ids}
diff --git a/man/theme_ids.Rd b/man/theme_ids.Rd
new file mode 100644
index 0000000..7f64164
--- /dev/null
+++ b/man/theme_ids.Rd
@@ -0,0 +1,72 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/ggplot-theme.R
+\name{theme_ids}
+\alias{theme_ids}
+\title{IDS Theme for ggplot2}
+\usage{
+theme_ids(
+ base_size = 14,
+ base_family = idsBaseFontFamily,
+ style = c("default", "light", "dark"),
+ bgcolor = NULL
+)
+}
+\arguments{
+\item{base_size}{base font size, given in pts.}
+
+\item{base_family}{base font family}
+
+\item{style}{\code{'light'}, \code{'dark'}.}
+
+\item{bgcolor}{Deprecated}
+}
+\description{
+Based on Highcharts ggtheme \link[ggthemes]{theme_hc}
+which again is based on the plots in \url{Highcharts JS}.
+}
+\note{
+Note that here, unlike with the highcharter theme, you have to set the scale
+explicitly.
+}
+\examples{
+library(ggplot2)
+library(idsThemeR)
+
+if (interactive()) {
+p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg,
+ colour = factor(gear))) + facet_wrap(~am)
+p + theme_ids() + scale_colour_ids()
+p + theme_ids(style = "dark") +
+ scale_colour_ids("dark")
+
+dtemp <- data.frame(Months = factor(rep(substr(month.name, 1, 3), 4),
+ levels = substr(month.name, 1, 3)),
+ City = rep(c("Tokyo", "New York", "Berlin", "London"),
+ each = 12),
+ Temperature = c(7.0, 6.9, 9.5, 14.5, 18.2, 21.5,
+ 25.2, 26.5, 23.3, 18.3, 13.9, 9.6,
+ -0.2, 0.8, 5.7, 11.3, 17.0, 22.0,
+ 24.8, 24.1, 20.1, 14.1, 8.6, 2.5,
+ -0.9, 0.6, 3.5, 8.4, 13.5, 17.0,
+ 18.6, 17.9, 14.3, 9.0, 3.9, 1.0,
+ 3.9, 4.2, 5.7, 8.5, 11.9, 15.2,
+ 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
+
+ggplot(dtemp, aes(x = Months, y = Temperature, group = City, color = City)) +
+ geom_line() +
+ geom_point(size = 1.1) +
+ ggtitle("Monthly Average Temperature", subtitle="Source: WorldClimate.com") +
+ theme_ids() +
+ scale_colour_ids()
+
+}
+
+}
+\references{
+\link[ggthemes]{theme_hc}
+
+\url{http://www.highcharts.com/demo/line-basic}
+
+\url{https://github.com/highslide-software/highcharts.com/tree/master/js/themes}
+}
+\concept{themes ids}