I would like to plot a 3D-Line Plot with Plotly for time-series and fill under the every line. I have an example code here.
library(plotly)
dens <- with(diamonds, tapply(price, INDEX = cut, density))
data <- data.frame(
x = unlist(lapply(dens, "[[", "x")),
y = unlist(lapply(dens, "[[", "y")),
cut = rep(names(dens), each = length(dens[[1]]$x)))
p <- plot_ly(data, x = ~cut, y = ~x, z = ~y, type = 'scatter3d', mode = 'lines', color = ~cut)
p
with this code I can produce this plot
3d line plot without filling
I have already tried surfaceaxis=0
, 1, or 2 and they produced wrong fillings.
3D-Plotly with wrong filling
What I want is to fill the areas between x-axis and line plots.
there is an example 3D-plot with another values.
As an example 3D-Plot with filling under the curves for another values
Can someone please suggest a method? Thank you in advance.
Edit: It has to be created with the package "plotly"