Plot.Histogram {AutoPlots}R Documentation

Plot.Histogram

Description

Build a histogram plot by simply passing arguments to a single function. It will sample your data using SampleSize number of rows. Sampled data is randomized.

Usage

Plot.Histogram(
  dt = NULL,
  SampleSize = 30000L,
  XVar = NULL,
  YVar = NULL,
  GroupVar = NULL,
  YVarTrans = "Identity",
  XVarTrans = "Identity",
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = NULL,
  NumberBins = 30,
  Height = NULL,
  Width = NULL,
  EchartsTheme = "macarons",
  Title = "Histogram",
  MouseScroll = TRUE,
  TimeLine = FALSE,
  ShowLabels = FALSE,
  Title.YAxis = NULL,
  Title.XAxis = NULL,
  TextColor = "white",
  title.fontSize = 22,
  title.fontWeight = "bold",
  title.textShadowColor = "#63aeff",
  title.textShadowBlur = 3,
  title.textShadowOffsetY = 1,
  title.textShadowOffsetX = -1,
  xaxis.fontSize = 14,
  yaxis.fontSize = 14,
  Debug = FALSE
)

Arguments

dt

source data.table

SampleSize

An integer for the number of rows to use. Sampled data is randomized. If NULL then ignored

XVar

X-Axis variable name

YVar

Y-Axis variable name

GroupVar

Column name of Group Variable for distinct colored histograms by group levels

YVarTrans

"Asinh", "Log", "LogPlus1", "Sqrt", "Asin", "Logit", "PercRank", "Standardize", "BoxCox", "YeoJohnson"

XVarTrans

"Asinh", "Log", "LogPlus1", "Sqrt", "Asin", "Logit", "PercRank", "Standardize", "BoxCox", "YeoJohnson"

FacetRows

Defaults to 1 which causes no faceting to occur vertically. Otherwise, supply a numeric value for the number of output grid rows

FacetCols

Defaults to 1 which causes no faceting to occur horizontally. Otherwise, supply a numeric value for the number of output grid columns

FacetLevels

Faceting rows x columns is the max number of levels allowed in a grid. If your GroupVar has more you can supply the levels to display.

NumberBins

= 30

Height

"400px"

Width

"200px"

EchartsTheme

= EchartsTheme,

Title

character

MouseScroll

logical, zoom via mouse scroll

TimeLine

logical

ShowLabels

FALSE

Title.YAxis

NULL

Title.XAxis

NULL

TextColor

"white"

title.fontSize

22

title.fontWeight

"bold"

title.textShadowColor

'#63aeff'

title.textShadowBlur

3

title.textShadowOffsetY

1

title.textShadowOffsetX

-1

xaxis.fontSize

14

yaxis.fontSize

14

Debug

Debugging purposes

Value

plot

Author(s)

Adrian Antico

See Also

Other Standard Plots: Plot.ACF(), Plot.Area(), Plot.BarPlot3D(), Plot.Bar(), Plot.Box(), Plot.Copula3D(), Plot.Copula(), Plot.CorrMatrix(), Plot.Density(), Plot.Donut(), Plot.HeatMap(), Plot.Line(), Plot.PACF(), Plot.Parallel(), Plot.Pie(), Plot.ProbabilityPlot(), Plot.Radar(), Plot.River(), Plot.Rosetype(), Plot.Scatter3D(), Plot.Scatter(), Plot.StackedBar(), Plot.Step(), Plot.WordCloud()

Examples

# Create fake data
dt <- data.table::data.table(Y = qnorm(p = runif(10000)))

# Create plot
AutoPlots::Plot.Histogram(
  dt = dt,
  SampleSize = 30000L,
  XVar = NULL,
  YVar = "Y",
  GroupVar = NULL,
  YVarTrans = "Identity",
  XVarTrans = "Identity",
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = NULL,
  NumberBins = 30,
  Height = NULL,
  Width = NULL,
  EchartsTheme = "macarons",
  Title = "Histogram",
  MouseScroll = TRUE,
  TimeLine = FALSE,
  ShowLabels = FALSE,
  Title.YAxis = NULL,
  Title.XAxis = NULL,
  TextColor = "white",
  title.fontSize = 22,
  title.fontWeight = "bold",
  title.textShadowColor = '#63aeff',
  title.textShadowBlur = 3,
  title.textShadowOffsetY = 1,
  title.textShadowOffsetX = -1,
  xaxis.fontSize = 14,
  yaxis.fontSize = 14,
  Debug = FALSE)

[Package AutoPlots version 1.0.0 Index]