Orion Constellation Project

Hi,

I am submitting my Orion Constellation project for feedback. It can be found on my Github at:

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?

Hi @arrayninja42536.

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(...

See https://matplotlib.org/3.3.0/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.scatter for details.

1 Like

Ah! I see. That makes sense, though is a bit poorly explained in the text.

I’ve updated it now.

Thanks for your feedback!

1 Like