hist_boxplot: Plot a histogram with a boxplot below

Description Usage Arguments Value Author(s) Examples

View source: R/hist_boxplot.r

Description

Plots a histogram with a boxplot below

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hist_boxplot(
  x,
  freq = TRUE,
  density = FALSE,
  main = NULL,
  xlab = NULL,
  ymax = NULL,
  col.hist = "lightblue",
  col.boxplot = "lightblue",
  ...
)

Arguments

x

a numeric vector

freq

boolean, TRUE for frequency or FALSE probability on the y axis

density

boolean, TRUE to plot the estimated density

main

character string, main title of the histogram

xlab

character string, label of the x axis

ymax

numeric value, maximum of the y axis

col.hist

color of the histogram

col.boxplot

color of the boxplot

...

other arguments to be passed in hist()

Value

None

Author(s)

Hugo Varet

Examples

1
2
3
par(mfrow=c(1,2))
hist_boxplot(rnorm(100),col.hist="lightblue",col.boxplot="red",freq=TRUE)
hist_boxplot(rnorm(100),col.hist="lightblue",col.boxplot="red",freq=FALSE,density=TRUE)

hvaret/packHV documentation built on July 4, 2020, 12:04 a.m.