From: James Ramm on
I've been looking at making volumetric data from vectors of X,Y,Z and R.
X and Y are UTM co-ordinates, and Z describes 5 different elevations at each XY couple. For each XYZ point there is a data value R.
I start by arranging x and y so that there is a seperate data point for each z, i.e the same x and y co-ordinates are repeated 5 times to cover each elevation.
I define regular 3D grids with meshgrid by using the max and min of each X Y Z value with the linspace function, e.g:
xv=linspace (min(X),max(X), res)
[Xi,Yi,Zi]=meshgrid(xv,yx,zv)


and use griddata3 to grid R across my 3D grid:
[Ri]=griddata3(X,Y,Z,R,Xi,Yi,Zi)

Then i plotted this image with slice:
slice(Xi,Yi,Zi,Ri,xv,yv,zv)

This plots the whole thing as a volume...I guess?

But - my questions :
1. Did griddata3 just arrange my R values into the regular grid - it did not interpolate where there are no data?

2. Using slice like this causes the whole grid to be plotted - where there are no R values, the bounding box/grid lines are plotted - can I turn them off, so I will just see the coloured data values?