Plotting in 3D

[1]:
import numpy as np

from poliastro.constants import J2000
from poliastro.examples import *
from poliastro.plotting import *
[2]:
import plotly.io as pio
pio.renderers.default = "notebook_connected"
[3]:
churi.plot(interactive=True, use_3d=True)
[4]:
frame = OrbitPlotter3D()

frame.plot(churi)
frame.plot_body_orbit(Earth, J2000)
[5]:
frame = OrbitPlotter3D()

frame.plot(molniya)
frame.plot(iss)
[6]:
eros = Orbit.from_sbdb("eros")

frame = OrbitPlotter3D()

frame.plot_body_orbit(Earth, J2000)
frame.plot(eros, label="eros")
[7]:
from poliastro.ephem import Ephem
from poliastro.util import time_range
[8]:
date_launch = time.Time("2011-11-26 15:02", scale="utc").tdb
date_arrival = time.Time("2012-08-06 05:17", scale="utc").tdb

earth = Ephem.from_body(
    Earth, time_range(date_launch, end=date_arrival, periods=50)
)
[9]:
frame = OrbitPlotter3D()
frame.set_attractor(Sun)

frame.plot_body_orbit(Earth, J2000, label=Earth)
frame.plot_ephem(earth, label=Earth)
[10]:
frame = OrbitPlotter3D()

frame.plot(eros, label="eros")
frame.plot_trajectory(earth.sample(), label=Earth)