View source: R/PlotFunctions.R
BoxPlot | R Documentation |
Build a box plot by simply passing arguments to a single function. It will sample your data using SampleSize number of rows. Sampled data is randomized.
BoxPlot(
data = NULL,
XVar = NULL,
YVar = NULL,
FacetVar1 = NULL,
FacetVar2 = NULL,
SampleSize = 1000000L,
FillColor = "gray",
OutlierSize = 0.1,
OutlierColor = "blue",
YTicks = "Default",
XTicks = "Default",
TextSize = 12,
AngleX = 90,
AngleY = 0,
ChartColor = "lightsteelblue1",
BorderColor = "darkblue",
TextColor = "darkblue",
GridColor = "white",
BackGroundColor = "gray95",
SubTitleColor = "blue",
LegendPosition = "bottom",
LegendBorderSize = 0.5,
LegendLineType = "solid",
Debug = FALSE
)
data |
Source data.table |
XVar |
Column name of X-Axis variable. If NULL then ignored |
YVar |
Column name of Y-Axis variable. If NULL then ignored |
FacetVar1 |
Column name of facet variable 1. If NULL then ignored |
FacetVar2 |
Column name of facet variable 2. If NULL then ignored |
SampleSize |
An integer for the number of rows to use. Sampled data is randomized. If NULL then ignored |
FillColor |
'gray' |
OutlierSize |
0.10 |
OutlierColor |
'blue' |
YTicks |
Choose from 'Default', 'Percentiles', 'Every 5th percentile', 'Deciles', 'Quantiles', 'Quartiles' |
XTicks |
Choose from 'Default', '1 year', '1 day', '3 day', '1 week', '2 week', '1 month', '3 month', '6 month', '2 year', '5 year', '10 year', '1 minute', '15 minutes', '30 minutes', '1 hour', '3 hour', '6 hour', '12 hour' |
TextSize |
14 |
AngleX |
90 |
AngleY |
0 |
ChartColor |
'lightsteelblue' |
BorderColor |
'darkblue' |
TextColor |
'darkblue' |
GridColor |
'white' |
BackGroundColor |
'gray95' |
SubTitleColor |
'darkblue' |
LegendPosition |
'bottom' |
LegendBorderSize |
0.50 |
LegendLineType |
'solid' |
Debug |
FALSE |
Adrian Antico
Other Graphics:
AddFacet()
,
BarPlot()
,
ChartTheme()
,
CorrMatrixPlot()
,
DensityPlot()
,
HeatMapPlot()
,
HistPlot()
,
PlotlyConversion()
,
StockData()
,
StockPlot()
,
ViolinPlot()
,
multiplot()
## Not run:
# Load packages
library(AutoQuant)
library(data.table)
# Load data
data <- data.table::fread(file = file.path('C:/Users/Bizon/Documents/GitHub/BenchmarkData1.csv'))
# Run function
AutoQuant:::BoxPlot(
data = data,
XVar = 'Region',
YVar = 'Weekly_Sales',
FacetVar1 = 'Store',
FacetVar2 = NULL,
SampleSize = 1000000L,
FillColor = 'gray',
OutlierSize = 0.10,
OutlierColor = 'blue',
YTicks = 'Default',
XTicks = 'Default',
TextSize = 12,
AngleX = 90,
AngleY = 0,
ChartColor = 'lightsteelblue1',
BorderColor = 'darkblue',
TextColor = 'darkblue',
GridColor = 'white',
BackGroundColor = 'gray95',
SubTitleColor = 'blue',
LegendPosition = 'bottom',
LegendBorderSize = 0.50,
LegendLineType = 'solid',
Debug = FALSE)
# Step through function
# XVar = 'Region'
# YVar = 'Weekly_Sales'
# FacetVar1 = 'Store'
# FacetVar2 = 'Dept'
# SampleSize = 1000000L
# FillColor = 'gray'
# OutlierSize = 0.10
# OutlierColor = 'blue'
# YTicks = 'Default'
# XTicks = 'Default'
# TextSize = 12
# AngleX = 90
# AngleY = 0
# ChartColor = 'lightsteelblue1'
# BorderColor = 'darkblue'
# TextColor = 'darkblue'
# GridColor = 'white'
# BackGroundColor = 'gray95'
# SubTitleColor = 'blue'
# LegendPosition = 'bottom'
# LegendBorderSize = 0.50
# LegendLineType = 'solid'
# Debug = FALSE
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.