 # Orion Constellation Project feedback requested

Hi,

I’m very new to coding, just completed this orion_constellation project and would like some feedback.

thanks
Stephen

I don’t know if the github link will work so, it maybe helps if I just share the code %matplotlib notebook
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# Orion

x = [-0.41,0.57,0.07,0,-0.29,-0.32,-0.5,-0.23,-0.23]
y = [4.12,7.71,2.36,9.1,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]
n = [‘Betelgeuse’, ‘Regel’, ‘Bellatrix’, ‘Mintaka’, ‘Alnilam’, ‘Alnitak’, ‘Saiph’, ‘Iota’, ‘Orion nebula’]

plt.close(‘all’)
fig_orion2d = plt.figure(figsize=(6,6))
plt.xlabel(’’)
#plt.plot(x,y, color=’#1cbeeb’)
plt.scatter(x,y, color=’#63eb1c’)
plt.axis([-1,1,0,16])
plt.title(‘2D representation of the Orion Constellation’, color=’#63eb1c’)
plt.xlabel(‘x-axis(m)’)
plt.ylabel(‘y-axis(m)’)
for i, txt in enumerate(n):
ax_orion2d.annotate(txt, (x[i], y[i]))

fig_orion3d = plt.figure()
plt.title(‘3D Representation of the Orion Constellation.’, color=’#c4062c’)
ax_orion.set_xlabel(‘x-axis(m)’)
ax_orion.set_ylabel(‘y-axis(m)’)
ax_orion.set_zlabel(‘z-axis(m)’)
ax_orion.scatter(x,y,z, color=’#c4062c’, marker=‘o’)

Hi there,
Well done!
Assuming the code works, what stands out is that you have labelled and introduced formatting into the graph (colors, annotation,markers).
This is something new that I am learning from the code:
for i, txt in enumerate(n):
ax_orion2d.annotate(txt, (x[i], y[i]))

P.S. You can include output images for easy perusal as an image snippet. Couldn’t access through link.
Access the post here.

Best,
Kabir

1 Like

Hi Stephen,
As shared above, the code and plots look really great and are above expectations per the rubric. Elements annotations, axis labels, title color stand out over and above the minimum requirements of the projects.
Was wondering if similar to tight layout for charts, we have a similar argument for annotations as well. (nebula)

On a side-note, the visibility of the green though Just kidding.

Look forward to more learnings from your next projects Cheers

I love the labels on the 2d plot! I was struggling to figure them out from the plot I got. I’ll have to give this a go.