I have a data frame containing different time-series signals which I'm trying to plot in 3D, with the x-axis representing Time, the Y-axis representing a standardized value for all the lines, and the Z-axis showing each line. Here's an example of what I mean.
I have a snippet of code I'm trying to configure now to output it properly but I'm not sure how to properly assign the y and z variables. The df contains 5 columns; Time + 4 different time-series signals.
plot_ly(
data = df,
x = df$Time,
y = scale(df),
z = names(df),
type = 'scatter3d',
mode = 'lines',
color = c('red', 'blue', 'yellow', 'green'))
Dataframe looks like so:
Time coup.nu Coup.nuti coup.Ca coup.B
1 198.001 0.0002630826 0.0003027965 2.141347e-07 1
2 198.002 0.0002630829 0.0003027953 2.141379e-07 1
3 198.003 0.0002630833 0.0003027940 2.141412e-07 1
4 198.004 0.0002630836 0.0003027928 2.141444e-07 1
5 198.005 0.0002630840 0.0003027916 2.141477e-07 1
I'm trying to use plotly or ggplot to perform the render. Thanks for the help!
I sourced this from: https://www.r-bloggers.com/2016/06/3d-density-plot-in-r-with-plotly/
data.frame
or post the output ofdput(df)
. – ismirsehregalfill
argument available forscatter3d
traces in plotly yet. Please see this. – ismirsehregal