plot-distributionH: Plot a histogram

plot-distributionHR Documentation

Plot a histogram

Description

Plots a distributionH object as a histogram, a cumulative distribution function, a quantile function, a density or a boxplot.

Usage

## S4 method for signature 'distributionH'
plot(x, type = "HISTO", col = "green", border = "black")

Arguments

x

A distributionH object.

type

The type of plot: "HISTO" (default, histogram), "CDF" (cumulative distribution function), "QF" (quantile function), "DENS" (kernel density approximation), "HBOXPLOT" (horizontal boxplot) or "VBOXPLOT" (vertical boxplot).

col

The fill colour (default "green").

border

The colour of the borders (default "black").

Value

The plot is drawn on the current device and the ggplot object is returned invisibly, so that it can be further modified, e.g. p <- plot(mydist); p + ggplot2::theme_bw().

Examples

mydist <- distributionH(x = c(7, 8, 10, 15), p = c(0, 0.2, 0.7, 1))
plot(mydist)
plot(mydist, type = "HISTO", col = "red", border = "blue")
plot(mydist, type = "DENS", col = "red", border = "blue")
plot(mydist, type = "HBOXPLOT")
plot(mydist, type = "VBOXPLOT")
plot(mydist, type = "CDF")
plot(mydist, type = "QF")

HistDAWass documentation built on Oct. 29, 2026, 5:07 p.m.