plot multiple histograms in one plot
histogram.ade(x, group=NULL, w=NULL, data=NULL, vnames=NULL, freq=FALSE,
breaks="Sturges", density=NULL, angle=NULL, xlab=NULL, ylab=NULL,
main="", xlim=NULL, ylim=NULL, legendon="topright", xticks=NULL,
col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL, alpha=NULL, lwd=1,
kern=TRUE, norm=TRUE, bars=TRUE, wall=0, v=NULL, h=NULL, lty=2)
a numeric vector
a string with the name of the variable in the data.frame
a formula x~group
a factor to make separate histogram for each class
a string with the name of the group variable in the data.frame
weights for weighted histograms
a data.frame
a vector of character strings with the names of groups in the legend
logical: TRUE representation of frequencies or FALSE component density.
a single number giving the number of cells for the histogram
the density of shading lines, in lines per inch. Set it to NA avoid shading lines with wall=0.
the vector of slopes of shading lines, given as an angle in degrees (counter-clockwise).
a title for the x axis
a title for the y axis
an overall title for the plot
the x limits (x1, x2) of the plot
the y limits (y1, y2) of the plot
a single keyword from:
"bottomright"
"bottom"
"bottomleft"
"left"
"topleft"
"top"
"topright"
"right"
"center"
This places the legend on the inside of the plot frame at the given location.
the number of ticks on the x axis or a vector of exact ticks
colors for each histogram
color of the text in whole plot
the background color for plot dekoration
color for the lines in plot, a vector of colors is possible, only used if h or v is given
a parameter in [0, 1] for semi-transparency of histogram
the line width
logical asking whether to draw lines for kernel density estimation
logical asking whether to draw density from normal distribution for comparison
logical asking whether to draw bars or only polygones of kernel density estimation
a number between 0 and 6 for selection the dekoration style of the plot.
the x-value(s) for vertical line(s).
the y-value(s) for horizontal line(s).
the line type, a vector of types is possible
g<-rbinom(1000, 1, 0.5)
x<-rnorm(1000)+g
histogram.ade(x, g, wall=3, breaks=24)
histogram.ade(x, g, wall=2, bars=FALSE)
Run the code above in your browser using DataLab