JuliaTeX / PGFPlots.jl

This library uses the LaTeX package pgfplots to produce plots.
Other
188 stars 36 forks source link

Add KDE to base functionality #176

Open lkruse opened 3 years ago

lkruse commented 3 years ago

Feature request: add kernel density estimation plots to the core PGFPlots functionality.

The following code chunk is an MWE that produces the included bimodal plot.

using Distributions
using KernelDensity
using PGFPlots

N = 100
X = 10*rand(N); X[N÷2:end] .+= 20

k = kde(X)
p = Axis(Plots.Linear(k.x, k.density, closedCycle=true), 
        ymin=0, style="area style, enlarge x limits=false")

kde_example