import kete
import numpy as np
import matplotlib.pyplot as plt
obj = kete.HorizonsProperties.fetch("C/2010 J4")
# eccentricity=0.9999988445770738
state = obj.state
vals = []
times = np.linspace(0, 365, 1000)
for jd in times + kete.Time.from_ymd(2010, 1, 1).jd:
state = kete.propagate_n_body([state], jd)[0]
vals.append(state.elements.true_anomaly)
plt.plot(times, vals)