Learn R Programming

RemixAutoML (version 0.4.2)

ChartTheme: ChartTheme function is a ggplot theme generator for ggplots

Description

This function helps your ggplots look professional with the choice of the two main colors that will dominate the theme

Usage

ChartTheme(
  Size = 12,
  AngleX = 35,
  AngleY = 0,
  ChartColor = "lightsteelblue1",
  BorderColor = "darkblue",
  TextColor = "darkblue",
  GridColor = "white",
  BackGroundColor = "gray95",
  LegendPosition = "bottom"
)

Arguments

Size

The size of the axis labels and title

AngleX

The angle of the x axis labels

AngleY

The angle of the Y axis labels

ChartColor

"lightsteelblue1",

BorderColor

"darkblue",

TextColor

"darkblue",

GridColor

"white",

BackGroundColor

"gray95",

LegendPosition

Where to place legend

Value

An object to pass along to ggplot objects following the "+" sign

See Also

Other Graphics: RemixTheme(), TimeSeriesPlotter(), multiplot()

Examples

Run this code
# NOT RUN {
data <- data.table::data.table(DateTime = as.Date(Sys.time()),
  Target = stats::filter(rnorm(1000,
                               mean = 50,
                               sd = 20),
                         filter=rep(1,10),
                         circular=TRUE))
data[, temp := seq(1:1000)][, DateTime := DateTime - temp][
  , temp := NULL]
data <- data[order(DateTime)]
p <- ggplot2::ggplot(data, ggplot2::aes(x = DateTime, y = Target)) +
  ggplot2::geom_line()
p <- p + ChartTheme(Size = 12)
# }

Run the code above in your browser using DataLab