简体   繁体   中英

Plotting 3D graphics in Python 3

I want to do some 3D plotting to visualize some data. I'm using matplotlib but the 3D features of matplotlib are not as powerful as 2D plotting. I found Mayavi very powerful. Even matplotlib recommends it in http://matplotlib.org/mpl_toolkits/mplot3d/faq.html

However, most of my previous work are done in Python 3, but MayaVi do not support Python 3 yet.

How could I plot 3D graphics in Python 3?

Vispy is a relatively new framework under active development, which has recently grown powerful and flexible enough (in its high level interfaces) to replace my own use of mayavi. The downside is that it's a little more involved for some things right now, as this high level stuff is still being developed. Having observed its progress for a while I'm confident that the remaining issues will be fairly quickly addressed, and I think it will end up with a robust interface similar to mayavi but with more varied features that are relatively easy to modify at lower levels. This is particularly in comparison to mayavi which has many powerful features of its own, but which I found relatively difficult to work with once away from the main, well documented interfaces.

I've also heard good things about glumpy and PyQtGraph , but I haven't tried these. Glumpy's documentation seems relatively sparse and focus on relatively low level operations compared to mayavi, but its examples exhibit a wide range of powerful effects. PyQTGraph has a more sophisticated UI (maybe more familiar if you like mayavi's ui stuff, though it's not the same) and maybe some different plotting features.

Of course you can also use opengl directly, but this means reinventing a lot of wheels. If inclined to go this way, I think vispy (or maybe glumpy) is still a good choice, as its low level opengl wrappers are nice but you can potentially take advantage of its higher level stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM