# 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

1 Like

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.

1 Like

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)

I have much the same problem. â€śJavascript Error: IPython is not definedâ€ť .