Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.654 kb
GeomDensity <- proto(GeomArea, {
objname <- "density"
desc <- "Display a smooth density estimate"
details <- "A smooth density estimate calculated by stat_density"
icon <- function(.) {
x <- seq(0, 1, length=80)
y <- dnorm(x, mean=0.5, sd=0.15)
linesGrob(x, 0.05 + y / max(y) * 0.9, default="npc")
}
default_stat <- function(.) StatDensity
default_pos <- function(.) PositionIdentity
seealso <- list(
geom_histogram = "for the histogram"
)
default_aes <- function(.) defaults(aes(fill=NA, weight=1, colour="black"), GeomArea$default_aes())
examples <- function(.) {
# See stat_density for examples
}
})
Jump to Line
Something went wrong with that request. Please try again.