import numpy as np
import matplotlib.pyplot as plt

objects = ['Mercury', 'Venus', 'Earth', 'Ceres', 'Mars', 'Jupiter', 'Saturn',
           'Uranus', 'Neptune']
indices = [-np.inf, 0, 1, 2, 3, 4, 5, 6, 7]
distance = [0.38, 0.72, 1.00, 1.52, 2.77, 5.2, 9.54, 19.22, 30.06]

# Titus-Bode rada: d = 0.4 + 0.3^x, kde x predstavuje index telesa
titus_bode = 0.4 + 0.3*np.power(2, indices)

plt.plot(distance)
plt.plot(titus_bode)
plt.ylabel('distance [AU]')
plt.xticks(range(9), objects)
plt.legend(['real distance', 'Titus-Bode distance'])
