code: def plot_energy(time, H, T, U):
      
      # Normalize energy to initial KE
      T0 = T[0]
      H = H / T0
      T = T / T0
      U = U / T0
      
      # Plot
      fig, ax = plt.subplots(figsize=[16,8])
      ax.set_title('System Energy vs. Time')
      ax.set_xlabel('Time in Days')
      ax.set_ylabel('Energy (Ratio Initial KE)')
      ax.plot(time, T, label='T', color='r')
      ax.plot(time, U, label='U', color='b')
      ax.plot(time, H, label='H', color='k')
      ax.legend()
      ax.grid()
      plt.show()
docs: Plot kinetic and potential energy of system over time