volumebounds

Returns the coordinate and color limits of volume data.

Category: Graphics > 2-D and 3-D Plots

Syntax

lims = volumebounds(X, Y, Z, V)

Returns limits for scalar volume data.

lims = volumebounds(X, Y, Z, U, V, W)

Returns limits for vector volume data, with color limits from the speed.

Description

The result can be passed straight to axis and clim so that a volume visualization fills the axes with a suitable color range.

Input arguments

X, Y, Z
Coordinate arrays.
V
3-D array of scalar values.
U, V, W
Vector components.

Output arguments

lims
Vector [xmin xmax ymin ymax zmin zmax cmin cmax]. The color limits come from the scalar data, or from the vector magnitude.

Example

Limits of a small volume

[X, Y, Z] = meshgrid(1:3);
V = X + Y + Z;
lims = volumebounds(X, Y, Z, V)
Output
lims = 1×8

     1     3     1     3     1     3     3     9

See also

slice isosurface axis clim