%matplotlib notebook
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = [-0.41, 0.57, 0.07, 0.00, -0.29, -0.32,-0.50,-0.23, -0.23]
y = [4.12, 7.71, 2.36, 9.10, 13.35, 8.13, 7.19, 13.25,13.43]
z = [2.06, 0.84, 1.56, 2.07, 2.36, 1.72, 0.66, 1.25,1.38]
stars = ['alpha','beta','gamma','delta','epsilon','zeta','kappa','iota','M42']
fig = plt.figure(figsize = (8,6))
fig.add_subplot(facecolor = 'darkblue')
for i in range(len(stars)):
plt.scatter(x[i],y[i],facecolor = 'white', edgecolor = 'royalblue')
plt.text(x[i] * (1 +0.01), y[i] * (1 + 0.001) , stars[i], fontsize=10)
plt.xlabel('orion x coordinates')
plt.ylabel('orion y coordinates')
plt.title('Orion Y vs X Coordinates')
plt.show()
ax3d = plt.figure(figsize=(10,8)).gca(projection='3d',facecolor='darkblue')
constellation3d = ax3d.scatter(x, y, z, facecolor = 'w', linewidth = 3 )
for xc, yc, zc, star in zip(x, y, z, stars):
ax3d.text(xc, yc, zc, star)
plt.xlabel('orion x coordinates',fontsize = 16, color ='w')
plt.ylabel('orion y coordinates',fontsize = 16, color='w')
ax3d.set_zlabel('orion z coordinates', fontsize = 16, color = 'w')
plt.title('Orion X Y Z Coordinates',fontsize = 18, y =1.03, color ='w')
plt.show()