You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Kernel density at corresponding gridpoints `Tuple.(x, permutedims(y))`."
Why do we carry this permutedims? This requires that StatsPlots explicitly perform the inverse transformation to plot a kde correctly, and it makes Plots default functions to plot the kde incorrectly with the most simple interpretation of the result:
julia>using Plots, KernelDensity
julia> x =vcat(randn(1000), 10.+randn(1000));
julia> y =randn(2000);
julia> d =kde((x,y));
julia>heatmap(d.x, d.y, d.density)
julia>scatter!(Tuple.(zip(x,y))
produces:
for the records,
julia>heatmap(d.x, d.y, permutedims(d.density))
will produce the correct plot.
The text was updated successfully, but these errors were encountered:
KernelDensity.jl/src/bivariate.jl
Line 21 in ae70f46
Why do we carry this
permutedims
? This requires thatStatsPlots
explicitly perform the inverse transformation to plot a kde correctly, and it makesPlots
default functions to plot the kde incorrectly with the most simple interpretation of the result:produces:
for the records,
will produce the correct plot.
The text was updated successfully, but these errors were encountered: