powered by
Plots a histogram with a boxplot below
hist_boxplot( x, freq = TRUE, density = FALSE, main = NULL, xlab = NULL, ymax = NULL, col.hist = "lightblue", col.boxplot = "lightblue", ... )
None
a numeric vector
boolean, TRUE for frequency or FALSE probability on the y axis
TRUE
FALSE
boolean, TRUE to plot the estimated density
character string, main title of the histogram
character string, label of the x axis
numeric value, maximum of the y axis
color of the histogram
color of the boxplot
other arguments to be passed in hist()
hist()
Hugo Varet
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)
Run the code above in your browser using DataLab