ChartTheme: ChartTheme

View source: R/PlotFunctions.R

ChartThemeR Documentation

ChartTheme

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 = 90,
  AngleY = 0,
  ChartColor = "lightsteelblue1",
  BorderColor = "darkblue",
  TextColor = "darkblue",
  SubTitleColor = "blue",
  GridColor = "white",
  BackGroundColor = "gray95",
  LegendPosition = "bottom",
  LegendBorderSize = 0.01,
  LegendLineType = "solid"
)

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"

SubTitleColor

'blue'

GridColor

"white"

BackGroundColor

"gray95"

LegendPosition

Where to place legend

LegendBorderSize

0.50

LegendLineType

'solid'

Value

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

Author(s)

Adrian Antico

See Also

Other Graphics: AddFacet(), BarPlot(), BoxPlot(), CorrMatrixPlot(), DensityPlot(), HeatMapPlot(), HistPlot(), PlotlyConversion(), StockData(), StockPlot(), ViolinPlot(), multiplot()

Examples

## 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)

## End(Not run)

AdrianAntico/ModelingTools documentation built on Feb. 1, 2024, 7:33 a.m.