If I understand your intent well, then you want to make slices through a 3D
volume and show such slice planes.

I’ve always done this with the various functions of an Axes3D instance that
allow you to specify the slice position. On the matplotlib examples page,
there is a good example that showed me how to do what I wanted (even though
I only had a series of 1D data):
polys3d_demo<http://matplotlib.org/1.3.1/examples/mplot3d/polys3d_demo.html>
.

You could use the same technique with contourf, which is probably closer to
what you want. Have a look at this stackoverflow
question<https://stackoverflow.com/questions/15582105/python-plot-stacked-image-slices>.


I hope this helps.


2014-04-03 6:50 GMT+02:00 james <jar...@gmail.com>:

> Hi All,
>
> I wish to make a 3d volume with a series of slices through it. I have X-Z
> data at 15 different Y planes. In MATLAB, I would make a pcolor plot, then
> set the Z data to the original ydata, and the Y data to a constant. This
> works fine.
>
> I would like to achieve a similar result in matplotlib, but I cannot figure
> out anyway to do it.
>
> Any help would be appreciated.
>
> James
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Set-X-Y-and-Z-data-for-a-pcolormesh-tp43187.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to