I am submitting my Orion Constellation project for feedback. It can be found on my Github at:
This file has been truncated.
"## Project: Visualizing the Orion Constellation\n",
"In this project you are Dr. Jillian Bellovary, a real-life astronomer for the Hayden Planetarium at the American Museum of Natural History. As an astronomer, part of your job is to study the stars. You've recently become interested in the constellation Orion, a collection of stars that appear in our night sky and form the shape of [Orion](https://en.wikipedia.org/wiki/Orion_(constellation)), a warrior God from ancient Greek mythology. \n",
"As a researcher on the Hayden Planetarium team, you are in charge of visualizing the Orion constellation in 3D using the Matplotlib function `.scatter()`. To learn more about the `.scatter()` you can see the Matplotlib documentation [here](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html). \n",
"You will create a rotate-able visualization of the position of the Orion's stars and get a better sense of their actual positions. To achieve this, you will be mapping real data from outer space that maps the position of the stars in the sky\n",
"The goal of the project is to understand spatial perspective. Once you visualize Orion in both 2D and 3D, you will be able to see the difference in the constellation shape humans see from earth versus the actual position of the stars that make up this constellation. \n",
"<img src=\"https://upload.wikimedia.org/wikipedia/commons/9/91/Orion_constellation_with_star_labels.jpg\" alt=\"Orion\" style=\"width: 400px;\"/>\n",
I couldn’t find a way to increase the size of the markers in the 3D plot though? I tried the argument s=100 and various other numbers, but it just kept saying that S had multiple values?
Your issue with changing marker sizes is tied in with another issue. If you use the standard
matplotlib.pyplot.scatter function then you can only get a 2D graph (if you check the figure you’ll note that all markers actually sit at
z = 0.0). As it happens I believe your third argument which you intended to be the z-axis values is actually being used as the first default argument of this function, which is
s. That’s why it moans that
s has been given multiple values.
You need to be using the
.scatter() method of the 3Daxis object instead in a manner akin to the following-
ax3d = fig_3d.add_subplot(1,1,1, projection='3d')
scatter3d = ax3d.scatter(...
https://matplotlib.org/3.3.0/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.scatter for details.
Ah! I see. That makes sense, though is a bit poorly explained in the text.
I’ve updated it now.
Thanks for your feedback!