Constellations

%matplotlib notebook
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

plt.subplot(2,2,1)
plt.scatter(x,y,color=‘green’)
plt.xlabel(‘x’)
plt.ylabel(‘y’)
plt.title(‘2D viewer - x vs y’)
plt.subplot(2,2,2)
plt.scatter(x,z,color=‘blue’)
plt.xlabel(‘x’)
plt.ylabel(‘z’)
plt.title(‘2D viewer - x vs z’)
plt.subplot(2,1,2)
plt.scatter(y,z,color=‘brown’)
plt.xlabel(‘y’)
plt.ylabel(‘z’)
plt.title(‘2D viewer - y vs z’)
plt.subplots_adjust(wspace=0.3, hspace=0.5)
plt.show()

plt.figure()
constellation3d = plt.axes(projection=‘3d’)
constellation3d.scatter(x,y,z,marker=’*’,color=‘red’)
constellation3d.set_title(‘Orion Shape in 3D’)
constellation3d.set_xlabel(‘x’)
constellation3d.set_ylabel(‘y’)
constellation3d.set_zlabel(‘z’)
plt.show()

Congrats on completing the project.
Though, it’s preferable to post a link to your GitHub repo for the project so people could see the results of the code written in the Jupyter Notebook.

Thanks lisalisaj for your advice, but I am still catching up the GitHub courses. :smile:

1 Like