Advertisement
This is comment for paste
two_objects_simple_task
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # How to print the orbits
- import pandas as pd
- import matplotlib.pyplot as plt
- path = r"D:\other\tom_and_jerry\planet_motion\planets_pathway.csv"
- if __name__ == '__main__':
- df =pd.read_csv(path)
- ax = df.plot(x="sun_x", y="sun_y", color='C3', label='sun')
- df.plot(x="earth_x", y="earth_y", color='C0', label='earth', ax=ax)
- plt.xlabel('X-coordinate')
- plt.ylabel('Y-coordinate')
- plt.grid(True)
- plt.title('Rotation of Earth Around the Sun')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement