View source: R/PlotFunctions.R
ChartTheme | R Documentation |
This function helps your ggplots look professional with the choice of the two main colors that will dominate the theme
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"
)
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' |
An object to pass along to ggplot objects following the "+" sign
Adrian Antico
Other Graphics:
AddFacet()
,
BarPlot()
,
BoxPlot()
,
CorrMatrixPlot()
,
DensityPlot()
,
HeatMapPlot()
,
HistPlot()
,
PlotlyConversion()
,
StockData()
,
StockPlot()
,
ViolinPlot()
,
multiplot()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.