Matplotlib alternative for 3D scatterplots

I find it difficult to use Matplotlib to visualize the results of my data reprocessing in 3 dimensions after applying principal component analysis or linear discriminant analysis. After executing the scatter plot, I cannot rotate the data or change the point of view on simple scaling (the axis of rotation remains the same even after zooming in and if you zoom in too many points, it just disappears) and each change takes one second. Matplotlib is very useful, but for this particular use case, it starts to get very frustrating as it probably wasn't designed for such tasks. Is there an alternative to Matplotlib in Python that does a better job with 3D scatterplots and where one can move smoothly across the cloud?

An example is shown in the following figure. I drew spheres around each data cluster corresponding to a specific class, and colored overlapping spheres with red. Now I want to see how these spheres intersect. I think the biggest problem with Matplotlib is that it doesn't allow you to move the entire plot with the mouse, it only allows you to rotate around a fixed point, which makes things very messy when you zoom in a little.

enter image description here

+3


source to share


2 answers


matplotlib is not quite mature for 3D graphics: http://matplotlib.org/mpl_toolkits/mplot3d/faq.html

mplot3d was intended to enable users to create simple 3D plots with the same โ€œlook and feelโ€ as matplotlibs 2D plots. Additionally, users can use the same toolbox they are already familiar with to generate both their 2D and 3D graphics.

I don't think easy navigation in a 3D plot is easy to do (even 3D scaling is not possible without setting up lib). mplot3d wasn't really meant for full 3D graphics in the beginning, but a nicer addition for people who need a basic 3D interface and who were familiar with the structure of matplotlib's 2D plot.



You might want to take a look at MayaVI (which is pretty good):

MayaVi2 is a very powerful and functional 3D graphics library. For advanced 3D scenes and great rendering capabilities, MayaVi2 is highly recommended.

Note that unlike matplotlib, MayaVI is not yet Python3 compatible (and may not be for the foreseeable future), so you will need Python2 installed.

+4


source


A very good alternative, but not in Python, is 3D Plot from ILNumerics ( http://ilnumerics.net/ ). It's in .NET



0


source







All Articles