Hi, i just finish my project and I have a question. How should I do to get bigger markers in the 3D scatterplot.
Any feedback is most welcome.
Thanks!
Hi, i just finish my project and I have a question. How should I do to get bigger markers in the 3D scatterplot.
Any feedback is most welcome.
Thanks!
Any sort of labelling is always a good sign so well done for adding them. You can adjust the size of the markers with the s
keyword argument like ax3d.scatter(x, y, z, s=30), see the docs for info-
https://matplotlib.org/3.3.0/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.scatter
Itâs hard to be sure from the image but have you tried changing the angle on that 3d plot. Itâs looke a little like those markers are on the same z-plane which can occur if you use the stanard matplotlib.pyplot.scatter
function instead of the 3d axis method. Check that very carefully.
Thanks tgretim for you comments.
Youâve been right.
I check the code and I saw that the chart was only in 2D. Also, with that code, before I couldnât use the parameter âsâ. I got an Error. This was the reason because I ask for the way to change the size of the markers.
So, I changed the old code for this one, and I got the next result.
fig_3d = plt.figure()
constellation3d = fig_3d.add_subplot(1,1,1, projection=â3dâ)
constellation3d.scatter(x,y,z, c=âredâ, marker=â*â, label = âOrionâs starsâ)
plt.title(âOrion Constellationâ, fontsize=15)
plt.xlabel(âOrionâs x Coordinatesâ)
plt.ylabel(âOrionâs Y Coordinatesâ)
plt.legend()
plt.show()
Thanks again for the help!