Here is what I got for my first plot:
fig = plt.figure()
fig.add_subplot(1, 1, 1)
plt.scatter(x, y)
plt.show()
This is what I got for my second plot:
This is my code:
fig_3d = plt.figure()
fig_3d.add_subplot(1, 1, 1, projection='3d')
constellation3d = plt.scatter(x, y, z)
plt.show()
Any advice on how to make this look better, or more informative, as well as any advice on the code would be stellar (Lol). Thanks!!
Hi, I have a comment om two things:
- How to enhance the visuals om the data points
- How to make labels for axes
Visuals: I used the following code:
ax = fig_3d.add_subplot(111, projection=‘3d’)
constellation3d = ax.scatter(x, z, y, marker=’’, lw=1, s=50)
where marker () gives me a star, s is for size of the marker and c is for marker color. I think it makes it more appealing to have stars in Orion
Axes labels:
Since i had already introduced the ‘ax’ (see above) I could label the axes with this code:
ax.set_zlabel(‘Star Distance’)
I wasn’t sure about the labelling, but at least I think z is the Star Distance
And last: a title would be handy: plt.title(‘Your title’)
Hope this was of any use.