From: Benjamin R. <ben...@ou...> - 2012-01-19 17:05:37
|
On Thu, Jan 19, 2012 at 10:30 AM, alw46 <ama...@gm...> wrote: > > Hi All, > > I have a question similar to one posted on Aug 30, 2011 titled "Plotting 2D > contourf in Axes3D X-Z plane instead of X-Y plane". In fact, it is the > same > question, and I can't seem to find a satisfactory answer anywhere. > > I've attached an image of what I've done in the X-Y plane for reference. > Like the other post, I'd like to do something similar to what I've done in > the X-Y direction, but in the X-Z and Y-Z planes. Since I've set up a grid > of points throughout the space, this effectively allows me to take "section > cuts" in different directions in the space. But I can't seem to figure out > how to do it. I've switched around the "z-dir", as well as replacing X and > Y with Z in ax.contourf. For reference, I'm using matplotlib 1.1.0. > > I'm trying to achieve a similar affect to Mayavi's 'image_plane_widget' to > take volume slices, but using matplotlib. > > http://old.nabble.com/file/p33168965/contours_xy.png > -- > View this message in context: > http://old.nabble.com/Plotting-contour-in-X-Z-plane-tp33168965p33168965.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > What you want is slightly different from what contourf3d does. Most likely, you have a 3D matrix and what you want is to plot representative 2D slices of that matrix with x, y, and z all being spatial coordinates. What contourf3d does is plots 2D data with x and y being spatial and z being the "intensity" value, not the spatial value. I have an idea of how to do what you want, but I need to test it a bit first. I will get back to you on that. Ben Root |