Итак, я создал симуляцию орбит Венеры, Земли, Марса и Юпитера вокруг Солнца, используя черепаху в Python. Ниже мой код:
Код: Выделить всё
import math
import matplotlib.pyplot as plt
import turtle
from turtle import *
...
def loop(bodies, earth):
timestep = 3600 * 24 * 7
step = 1
earth_years = -1
final_data = []
for step in range(0, max_step + 1):
update_info(step, bodies)
if 0.98
Источник: [url]https://stackoverflow.com/questions/78154006/is-there-a-way-of-adding-extra-information-to-a-graph-that-is-saved-using-matplo[/url]