Geom.density2d

Draw a kernel density estimate from data. An alias for Geom.contour with Stat.density2d.

Aesthetics

Arguments

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"))
x -2 0 2 4 6 8 -2 0 2 4 6 8 y