# Orion constellation: 2D & 3D visualization

Hi there. Heres is my project on the Orion constellation. I would like to hear if anyone can explain the axis. I was not able to recreate the image of Orion from Earth - and that leads me to doubt my understanding of the axes.
Any other comments are of course appreciated.

Here is my code

# Importing libraries

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

# Orion data points

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]

# 2D-visualisation

fig = plt.figure()
plt.scatter(x, y, marker=’*’, s=50, c=‘orange’)
plt.title(‘2D-model of the Orion constellation’)
plt.xlabel(‘x-axis - Horisontal’)
plt.ylabel(‘y-axis - Verical’)
plt.savefig(‘Orion2D.png’)
plt.show()

# 2D-plot # 3D-visualisation

fig_3d = plt.figure()
constellation3d = ax.scatter(x, z, y, marker=’*’, lw=1, s=50, c=‘orange’)
plt.title(‘3D-model of the Orion constellation’)
ax.set_xlabel(‘Horizontal view (x)’)
ax.set_ylabel(‘Verical view (y)’)
ax.set_zlabel(‘Star Distance’)
plt.savefig(‘Orion3D.png’)
plt.show()

# 3D-plot 1 Like

It looks like you have handed your data in to .scatter in the wrong order. It should be x, y, z.

The project info did state that the visualization would not be perfect because of curvature of the night sky. So even when your axes are changed, it’ll still look different!