CoordinateBounds

CoordinateBounds[coords]

gives a list {{xmin,xmax},{ymin,ymax},} of the bounds in each dimension of the region defined by coords.

CoordinateBounds[coords,δ]

pads the ranges of coordinates by ±δ in each dimension.

CoordinateBounds[coords,Scaled[s]]

pads by the scaled amount s in each dimension.

CoordinateBounds[coords,{p1,p2,}]

pads by p1, p2, in successive dimensions.

CoordinateBounds[coords,{{p1min,p1max},{p2min,p2max},]

gives {{xmin-p1min,xmax+p1max},{ymin-p2min,ymax+p2max},}

Details

Examples

open allclose all

Basic Examples  (1)

Find bounds for coordinates in 2 dimensions:

Pad by 1 in each direction:

Pad by 1/4 of the span in each dimension:

Scope  (1)

Coordinates in 3D of different types at various levels in a list:

Find the bounding box:

Pad by 1 in each dimension:

Pad by a fraction of the difference in each dimension:

Pad by different amounts for different dimensions:

Pad the minima and maxima differently:

Generalizations & Extensions  (1)

When there are coordinates that are not numerical, the result is typically expressed in terms of Min and Max:

Properties & Relations  (2)

Generally, CoordinateBounds[coords] is the transpose of CoordinateBoundingBox[coords]:

For coordinates given in a matrix, CoordinateBounds[coords] is equivalent to Map[MinMax, Transpose[coords]]:

Introduced in 2015
 (10.1)