Kernel density (w/ weights)

Hello, I have a vector of variables x, and a vector of weights y (y sums to 1). How can plot the pdf of the vector x?
Something like histogram(x,weights=y) but smoothed out.

Are you using StatsPlots.jl? Then you can simply do density(x, weights=y). The weights keyword is not documented, it might be good to file an issue or PR about this.