hist_fancy: Make a pretty Multiple Histogram

Description Usage Arguments Examples

Description

hist_fancy Extends the hist() function by using ggplot2 for making a pretty histogram. The function calls ggplot2::qplot to make multiple histograms, so arguments will be the same as the hist or the qplot. A qplot object is returned so it's possible to add geoms to it.

Usage

1

Arguments

...

Other arguments for the qplot, such as xlim, ylim, xlab, ylab, main, etc.

Named_Vectors

Each vector is used to draw a multiple histogram with each label matching the corresponding vector name.

Unnamed_Vectors

are named xnumber.

fill

Optional character vector specifying fill colours, as large as the number of vectors fed into the function.

Examples

1
2
3
hist_fancy(rnorm(1000))
hist_fancy(x = rnorm(1000), main = "Histogram", xlab = "Variables")
hist_fancy(x = rnorm(1000), y = rnorm(1000, 2), z = rnorm(1000, 4), alpha = 0.9)

InfProbSciX/PeRLib documentation built on May 15, 2019, 8:56 p.m.