Search code examples
pythonmatplotlibimshowmatplotlib-3d

Creating intersecting images with imshow or other function


I have two 3-D arrays of ground penetrating radar data. Each array is basically a collection of time-lapse 2-D images, where time is increasing along the third dimension. I want to create a 3-D plot which intersects a 2-D image from each array.

I'm essentially trying to create a fence plot. Some examples of this type of plot are found on these sites: http://www.geogiga.com/images/products/seismapper_3d_seismic_color.gif http://www.usna.edu/Users/oceano/pguth/website/so461web/seismic_refl/fence.png

I typically use imshow to individually display the 2-D images for analysis. However, my research into the functionality of imshow suggests it doesn't work with the 3D axes. Is there some way around this? Or is there another plotting function which could replicate imshow functionality but can be combined with 3D axes?


Solution

  • If you're happy to contemplate using a different plotting library (ie not matplotlib) then it might be worth considering mayavi / tvtk (although the learning curve is a little steep). The closest I've seen to what you want is the scalar cut planes in http://wiki.scipy.org/Cookbook/MayaVi/Examples

    The bulk of the documentation is at: http://docs.enthought.com/mayavi/mayavi/index.html