 # My Orion Constellation Project

If anyone could give me some feedback on how to make these plots more visually appealing (like how to make the dots in the 3D plot bigger), that would be great!

Here is the code for the 2D plot, and the output.

`fig = plt.figure()`
`fig.add_subplot(1,1,1)`
`plt.scatter(x,y, c='green')`
`plt.title('2D projection of Orion')`
`plt.show()` And here is the 3D code, and output.

`fig_3d = plt.figure()`
`fig_3d.add_subplot(1,1,1,projection='3d')`
`constellation3d = plt.scatter(x,y,z, c='red')`
`plt.title('3D Rotational Projection of Orion')`
`plt.show()` Thank you!

Hey,
I haven’t found how to make points bigger on the 3D graph. I tried with `marker='o'` but doesn’t seem to apply.
Here are my findings :

• 2D :
``````plt.figure()
plt.subplot(1, 1, 1)
plt.scatter([x],[y])
plt.show()
``````
• 3D :
``````plt.figure()
plt.subplot(1, 1, 1, projection="3d")
constellation3d = plt.scatter([x],[y],[z],marker='o')
plt.show()
``````

Thanks !

Here is my submission for the Orion Capstone Proyect:

Hi @jalexmcgraw838836446, @carlos_ferrer. Marker sizes for a scatter plot can be altered with the `s` argument-

``````fig_3d = plt.figure()
ax_3d = fig_3d.add_subplot(1, 1, 1, projection="3d")
constellation3d = ax_3d.scatter(x, y, z, marker='o', s=40)
fig_3d.show()
``````

You can always hunt down info for functions like this in matplotlib documentation, e.g.
https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#scatter-plots

Good job
Here are a few comments on how to add more to the plot for appearance

I added some labels to a few stars in the 2D plot with

# Bellatrix 05h25m07s +06°20’59" according to https://in-the-sky.org/skymap.php

ax.text(-0.41, 4.12, " Betelgeuse") #according to “The Orion constellation as an installation”
ax.text(0.52, 8.0, “Rigel”) #according to “The Orion constellation as an installation”
ax.text(0.07, 2.36, " Bellatrix") #according to “The Orion constellation as an installation”

I also added x and y axis labels
ax.set_xlabel(“Projected Right Ascension”) # add x label
ax.set_ylabel(“Projected Declination”) # add y label

I also added x, y, and z labels to the axis for better read
constellation3d.set_xlabel(“Projected Right Ascension”) # add x label
constellation3d.set_ylabel(“Projected Declination”) # add y label
constellation3d.set_zlabel(“Projected Distance”) # add y label

My project is at

1 Like

Hi,

When plotting the constellation in 2d I got the following error:

``````ReferenceError: IPython is not defined.
``````

I looked on the internet and I saw this GitHub post where someone had the same issue, but not with a Jupyter notebook. Instead of writing:

``````%matplotlib notebook
``````

at the beginning, I wrote:

``````%matplotlib inline
``````

as an answer in the GitHub post suggested. This fixed the issue, but now I’m not able to rotate the 3D graph…

Why isn’t “%matplotlib notebook” working in the first place?
I wrote every line as indicated in the instructions.

Don’t know. Inline is not interactive.
Maybe it is a bug or something with your configuration.
I had no issues running everything in Anaconda 3 with Python 3.8.3 (I think for Python)