StatsPlots.jl icon indicating copy to clipboard operation
StatsPlots.jl copied to clipboard

density plot with two arguments should default to contour

Open mkborregaard opened this issue 6 years ago • 1 comments

would be nice to have. See also this SO question: https://stackoverflow.com/questions/58087096/a-plot-describing-the-density-of-data-points-in-2d-space-in-julia The solution could be based on this other SO question: https://stackoverflow.com/questions/19390320/scatterplot-contours-in-matplotlib

mkborregaard avatar Sep 24 '19 20:09 mkborregaard

Actually this is mostly in place already. We just need to change the behaviour of density. Consider

a, b = randn(10000), randn(10000)
dens = StatsPlots.KernelDensity.kde((a,b))
plot(dens)

Skærmbillede 2019-10-02 kl  15 27 26 but

density(a, b)

Skærmbillede 2019-10-02 kl  15 34 26

mkborregaard avatar Oct 02 '19 13:10 mkborregaard