geom_density {ggplot2} | R Documentation |
A smooth density estimate calculated by
stat_density
.
geom_density(mapping = NULL, data = NULL, stat = "density", position = "identity", na.rm = FALSE, ...)
mapping |
The aesthetic mapping, usually constructed
with |
data |
A layer specific dataset - only needed if you want to override the plot defaults. |
stat |
The statistical transformation to use on the data for this layer. |
position |
The position adjustment to use for overlappling points on this layer |
na.rm |
If |
... |
other arguments passed on to
|
geom_density
understands the following aesthetics (required aesthetics are in bold):
x
y
alpha
colour
fill
linetype
size
weight
geom_histogram
for the histogram and
stat_density
for examples.
# See stat_density for examples