I want to make 3D plot in python using plotly. Actually its the first step of an animation but first I need to know how to create a 3D scatter plot of it as shown below which is made in matplotlib. I have the dataset which looks like this.
Now, I want to animate it against the dates mentioned but the code I am getting on official site of plotly like this and most of them are similar.
import plotly.express as px
df = px.data.iris()
fig = px.scatter_3d(df, x='sepal_length', y='sepal_width', z='petal_width',
color='species')
fig.show()
Now, I'm not able to understand how should I assign X,Y and Z
to get an animated plot. Because all the 13 columns I need in the plot against the date.
For reference I found this site Which said,
To get a 3D scatter plot you need to specify the trace as a plotly.graph_objs.Scatter3d object or as a dict with a type: 'scatter3d' key.
Feel free to share a full reproducible example if you’d like to work through more of the details.
But this wasn't enough.
Please help me with this. A link of proper code or guidance would be really helpful to how set variables to get a 3D plot animation. Thank you.