Skip to content

Instantly share code, notes, and snippets.

@jkrumbiegel
Created July 9, 2022 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkrumbiegel/5d059dbf07722cf8d97701cd35ac29a3 to your computer and use it in GitHub Desktop.
Save jkrumbiegel/5d059dbf07722cf8d97701cd35ac29a3 to your computer and use it in GitHub Desktop.
using Makie.KernelDensity
x = randn(1000)
k = kde(x, npoints = 200)
f = Figure()
ax = Axis3(f[1, 1], limits = (-4, 4, -4, 4, 0, 1))
p = poly!(ax, Point2f.(k.x, k.density),
model = Makie.Mat4f([ 1 0 0 0
0 0 1 4
0 1 0 0
0 0 0 1
])
)
p = poly!(ax, Point2f.(k.x, k.density),
model = Makie.Mat4f([ 0 0 1 4
1 0 0 0
0 1 0 0
0 0 0 1
])
)
f
@jkrumbiegel
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment