Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matplotlib - 3D plotting - Points are being defaulted to circles

I am trying to get do a 3D scatter plot, but the only markers that seems to work are so large that they start overlapping. I would like to just use '.' or ',', but I always get bumped to using 'o'. I could live with those if markersize would work in 3D plots. Is there a way around this?

like image 836
madtowneast Avatar asked Oct 15 '25 04:10

madtowneast


1 Answers

Types of markers

For scatter, '.' is for point markers and ',' is for pixel markers. When I attempt to use them, however, I get a ValueError claiming they do not exist, but that is likely due to using matplotlib v1.0.1; the changelog for v1.1.x includes a comment on markers:

There is now a common set of markers for all plotting functions. Previously, some markers existed only for scatter() or just for plot(). This is now no longer the case.

There is a table of the markers available for scatter in the documentation that you can try out. There is also an example in the gallery with a scatter plot using different markers.

Marker size

Marker size is also controllable in scatter, either with a scalar argument or an array to specify the size for each point. Take a look at the s formal parameter in the documentation.

like image 59
David Alber Avatar answered Oct 17 '25 18:10

David Alber