plotly - Is there any way to get the dots of an 3d scatter animation to blend between positions?

Viewed 238
def plot():
    size = 20
    #data_Dataframe = pd.DataFrame.from_dict(data)
    fig = px.scatter_3d(data, x="x", y="y", z="z",
                        color="Planeten", size = "size",
                        range_x=[-size, size],
                        range_y=[-size, size],
                        range_z=[-size, size],
                        animation_group="name",
                        animation_frame="date",
                        title="Spaceflight",
                        size_max = 100,
                        text = "name", opacity = 0.7)
    

    fig.update_traces(marker_sizemode="area", marker_opacity=1, mode = "lines+markers+text"
                      , hoverinfo="name+y+x+z", textposition = "middle center")



    fig.update_layout(margin_l=10, margin_r=10, margin_t=10, paper_bgcolor="#333333",
                      margin_b=10, legend=dict(title_font_size =15, title_font_family = "Arial",title_font_color = "#fff",
                                               font=dict(family="Arial", size=15, color="#fff"),
                                               bgcolor ="#707070", bordercolor= "Black", borderwidth = 2)

    

    fig.show()

When I compare the result with an 2d one it seems very abrupt

my plot

2d scatter plot example: https://plotly.com/python/animations/

Is there any way to get the dots to move between two positions and if so is it possible to draw a line on the way?

0 Answers
Related