Skip to contents

R6 class for mapping x, bins, binwidth,stack and distribution to data

Super classes

tlf::XYDataMapping -> tlf::XYGDataMapping -> HistogramDataMapping

Public fields

stack

logical defining if histogram bars should be stacked

bins

number of bins or binning values/methods passed on ggplot2::geom_histogram

binwidth

width of bins passed on ggplot2::geom_histogram. Overwrites bins

distribution

Name of distribution to fit to the data. Only 2 distributions are currently available: "normal" and "logNormal"

Methods

Inherited methods


Method new()

Create a new HistogramDataMapping object

Usage

HistogramDataMapping$new(
  stack = FALSE,
  bins = NULL,
  binwidth = NULL,
  distribution = NULL,
  ...
)

Arguments

stack

logical defining if histogram bars should be stacked

bins

argument passed on ggplot2::geom_histogram

binwidth

width of bins passed on ggplot2::geom_histogram. Overwrites bins

distribution

Name of distribution to fit to the data. Only 2 distributions are currently available: "normal" and "logNormal"

...

parameters inherited from XYGDataMapping

Returns

A new HistogramDataMapping object


Method clone()

The objects of this class are cloneable with this method.

Usage

HistogramDataMapping$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.