0
I have a code which computes the trajectory of a body considering only the gravitational force acting on it using the runge kutah integrator. I’ve done it using Matplotlib, and couple days ago I found out Plotly which made me interested to make the same using Plotly instead of Matplotlib because I think it looks better. This is the result of it:
However, I’ve found out a very beautiful picture I’d like to use in the place of the blue sphere to represent the Earth, like this:
fig = go.Figure(go.Scattergeo())
fig.update_geos(projection_type="orthographic")
fig.update_layout(height=300, margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
when I try to plot the trajectory and this Earth made with go.Scattergeo(), I get an error (which I was expecting):
Traj = dict()
Traj['Xc'] = DATA[0]
Traj['Yc'] = DATA[1]
Traj['Zc'] = DATA[2]
Traj['Time'] = DATA[3]
Traj = pd.DataFrame(Traj)
Path = go.Scatter3d(x=Traj["Xc"], y=Traj["Yc"], z=Traj["Zc"],marker=dict(size=3),line=dict(color='pink',width=1.5))
Earth = go.Figure(go.Scattergeo())
fig = go.Figure(data=[Earth,Path])
plot(fig)
So, how can I use this figure instead of the blue sphere and plot my trajectory?
Thanks!