Может быть и так, но я не уверен.
dat <- as.data.frame(matrix(rnorm(5000*10), ncol=10))
names(dat) <- LETTERS[1:10]
xvalues <- apply(dat, 2, function(y) density(y)$x)
xmin <- min(xvalues)
xmax <- max(xvalues)
yvalues <- c(apply(dat, 1, function(a) density(a, from=xmin, to=xmax)$y))
dd <- cbind(c(yvalues), xvalues=c(xvalues), a = colnames(dat))
library(plotly)
plot_ly(data.frame(dd), x = ~xvalues, y = ~a, z = ~yvalues, split = ~a,
type = "scatter3d", mode = "lines")
EDIT
Лучше, но все же не убедительно.
dat <- as.data.frame(matrix(rnorm(150*10), ncol=10))
names(dat) <- LETTERS[1:10]
xvalues <- apply(dat, 2, function(y) density(y)$x)
xmin <- min(xvalues)
xmax <- max(xvalues)
yvalues <- c(apply(dat, 2, function(a) density(a, from=xmin, to=xmax)$y))
dd <- cbind(c(yvalues), xvalues=c(xvalues), a = colnames(dat))
library(plotly)
plot_ly(data.frame(dd), x = ~xvalues, y = ~a, z = ~yvalues, split = ~a,
type = "scatter3d", mode = "lines")