plot_histogram.RdA convenience function making a call to
hist with changes to
the default options for parameters for pretty
plotting.
plot_histogram(
x,
breaks = "FD",
border = "grey",
col = "grey",
main = "",
plot = TRUE,
output = FALSE,
new = TRUE,
w = 5,
h = 5,
raw_points = TRUE,
...
)A vector of numeric values.
The argument controlling breakpoints
passed to the hist function -
by default uses the Freedman-Diaconis algorithm to
find the optimal number of breakpoints.
The color of the border around the bars.
The color used to fill the bars.
The main title for the figure.
Logical; if TRUE generates a figure.
Logical; if TRUE returns the
output from the hist function.
Set to TRUE if plot is FALSE.
Logical; if TRUE generates a new
plotting window via a call to x11.
The width (in inches) of the new plotting window.
The height (in inches) of the new plotting window.
Logical; if TRUE adds a bar for
individual data points at the bottom of the figure.
Additional arguments to pass to the
hist function.
If output is TRUE, returns a
list with the information used to create the
histogram - see the help page for the
hist function for more
details.
x <- rnorm( 100 )
plot_histogram( x, new = FALSE )