Python libraries for scripting disaggregation plots?

151 views
Skip to first unread message

Kevin Foster

unread,
May 30, 2022, 6:39:57 PM5/30/22
to OpenQuake Users
Doing some disaggregation plots. We'll be doing a lot of iterating, so we want to be able to generate automatic outputs via scripting. I started in with Matplotlib (bar3D) before discovering the well-known bug that impacts 3D bar plots. It causes the outputs in Matplotlib to look confusing, like an M.C. Escher illustration. There are reports going back 10 years, and according to their docs it sounds like Matplotlib isn't up to the task unless/until they switch to OpenGL. I'm looking for an alternative modern Python library that can do this.

It seems that modern data science has decided that 3-D bar plots are a bit passé, so my initial results from googling suggest that not every Python library supports it out-of-the-box. I don't necessarily mind hacking something up that generates the 3D bars via individual sides (six rectangles for each color bar), if that is what allows us to implement a scriptable workflow. But if I go that route, I'd like most other aspects of the library to be well-polished and it would need to be something developed for data science, not for games etc. Would want native support for nice looking axes and figure titles that won't leave me scratching my head.

d3? Plotly? Mayavi? something else?

Thanks for any thoughts.
Kevin




Stuart Orchard

unread,
Aug 25, 2022, 1:23:31 AM8/25/22
to OpenQuake Users
Something we have started doing is to represent magnitude-distance disaggregation plots as heatmaps using matplotlib, with contributions on the z (heat) axis. The one limitation of this approach is visualising epsilon values however.
Reply all
Reply to author
Forward
0 new messages