contourslice
Draws contour lines on slice planes of 3-D volume data.
Category: Graphics > 2-D and 3-D Plots
Syntax
contourslice(V, Sx, Sy, Sz)
Draws contours of the volume V on the slices at Sx, Sy and Sz.
contourslice(X, Y, Z, V, Sx, Sy, Sz)
Uses the grid coordinates X, Y and Z.
contourslice(___, n)
Draws n contour levels per slice.
h = contourslice(___)
Also returns the graphics objects.
Description
Each slice cuts the volume with a plane and the values on that plane are contoured. This reveals the internal structure of scalar volume data, such as temperature or density, without drawing the whole volume.
Input arguments
V- 3-D array of values.
Sx, Sy, Sz- Positions of the slice planes, perpendicular to each axis. Use
[]for none. n- Number of contour levels in each slice.
Output arguments
h- Handles of the contour lines drawn.
Example
Slices of random volume
rng(1)
V = smooth3(rand(12, 12, 12));
h = contourslice(V, [4 8], [], [6], 5);
view(3)
disp(numel(h) > 0)
Output
1