Geom.density2d
Draw a kernel density estimate from data. An alias for Geom.contour with Stat.density2d.
Aesthetics
x,y: Sample to draw density estimate from.
Arguments
bandwidth: See Geom.density.levels: See Geom.contour.
Examples
plot(x=rand(Rayleigh(2),1000), y=rand(Rayleigh(2),1000),
Geom.density2d(levels = x->maximum(x)*0.5.^collect(1:2:8)), Geom.point,
Theme(key_position=:none),
Scale.color_continuous(colormap=x->colorant"red"))