My Orion constellation project

Here is my project.
I am unsure how to increase the size of the markers for the 3D plot. Could anyone advise me on this?
Any other feedback is also greatly appreciated.

Thanks in advance!

[codebyte]

from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Orion x = [-0.41, 0.57, 0.07, 0.00, -0.29, -0.32,-0.50,-0.23, -0.23] y = [4.12, 7.71, 2.36, 9.10, 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] fig = plt.figure(figsize=(5,5)) ax = fig.add_subplot(1,1,1) plt.scatter(x,y,s=80,color='yellow',marker='*') plt.title('2D Constellation View') plt.xlabel('X Coordinates') plt.ylabel('Y Coordinates') plt.show() ax.set_facecolor('navy') fig_3d = plt.figure(figsize=(7,7)) ax=fig_3d.add_subplot(1,1,1,projection='3d') constellation3d = plt.scatter(x,y,z,color='yellow',marker='*') ax.set_facecolor('navy') [t.set_color('pink') for t in ax.yaxis.get_ticklabels()] [t.set_color('pink') for t in ax.xaxis.get_ticklabels()] [t.set_color('pink') for t in ax.zaxis.get_ticklabels()] plt.xlabel('X Coordinates',color='pink') plt.ylabel('Y Coordinates',color='pink') plt.ylabel('Z Coordinates',color='pink') plt.title('3D Constallation View',color='navy') plt.show()

Welcome & congrats on completing the project.

a couple of things…
You need to use the 3d object here:
ax=fig_3d.add_subplot(1,1,1,projection='3d')

Ex, something like this maybe:

fig3d = plt.figure()
ax3D = fig3d.add_subplot(1,1,1, projection="3d")
ax3D.set_facecolor('black')
plt.gca().patch.set_facecolor('white')
ax3D.grid(False)
plt.title('3D Constellation: Orion')
ax3D.set_xlabel('x coordinates')
ax3D.set_ylabel('y coordinates')
ax3D.set_zlabel('z coordinates')
....

ax3D.scatter(x,y,z, c='gold', marker = '*', s= 70)

You might find that these threads are helpful resources too:

1 Like