<jupyter_start><jupyter_text>Visualizing the SpaceX Tesla Roadster trip to Mars<jupyter_code>from astropy.time import Time
from astropy import units as u

from poliastro.bodies import Earth, Mars, Sun
from poliastro.ephem import Ephem
from poliastro.frames import Planes
from poliastro.plotting import OrbitPlotter3D
from poliastro.util import time_range

EPOCH = Time("2018-02-18 12:00:00", scale="tdb")
import plotly.io as pio
pio.renderers.default = "notebook_connected"
roadster = Ephem.from_horizons(
    "SpaceX Roadster",
    epochs=time_range(EPOCH, end=EPOCH + 360 * u.day),
    attractor=Sun,
    plane=Planes.EARTH_ECLIPTIC,
    id_type="majorbody",
)
roadster
from poliastro.plotting.misc import plot_solar_system
frame = plot_solar_system(outer=False, epoch=EPOCH)
frame.plot_ephem(roadster, EPOCH, label="SpaceX Roadster", color="black");
frame = OrbitPlotter3D(plane=Planes.EARTH_ECLIPTIC)

frame.plot_body_orbit(Earth, EPOCH)
frame.plot_body_orbit(Mars, EPOCH)

frame.plot_ephem(roadster, EPOCH, label="SpaceX Roadster", color="black")

frame.set_view(45 * u.deg, -120 * u.deg, 4 * u.km)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1059135039717564, 'fraction_numerical': 0.02206531332744925, 'mean_word_length': 6.4605263157894735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '56292', 'license': 'MIT', 'n_tokens_mistral': 451, 'n_tokens_neox': 427, 'n_words': 90, 'path': 'docs/source/examples/Visualizing the SpaceX Tesla Roadster trip to Mars.ipynb', 'repo_name': 'NanuSai/poliastro', 'size': '1133'}