R: Kernel Density Plots (Bandwidth Must be Strictly Positive)
问题 I am using the R programming language. I am following this tutorial over here for making 3d kernel density plots in R: https://plotly.com/r/3d-surface-plots/: library(MASS) library(plotly) kd <- with(MASS::geyser, MASS::kde2d(duration, waiting, n = 50)) fig <- plot_ly(x = kd$x, y = kd$y, z = kd$z) %>% add_surface() fig I decided to try this on my own data : #generate data a = rnorm(100,10,10) b = rnorm(100,5,5) c = rnorm(100,5,10) d = data.frame(a,b,c) #make 3d plot (I think n = 50 refers to