# bounding.box.xy

From spatstat v1.15-2
by Adrian Baddeley

##### Convex Hull of Points

Computes the smallest rectangle containing a set of points.

##### Usage

`bounding.box.xy(x, y=NULL)`

##### Arguments

- x
- vector of
`x`

coordinates of observed points, or a 2-column matrix giving`x,y`

coordinates, or a list with components`x,y`

giving coordinates (such as a point pattern object of class`"ppp"`

.) - y
- (optional) vector of
`y`

coordinates of observed points, if`x`

is a vector.

##### Details

Given an observed pattern of points with coordinates
given by `x`

and `y`

, this function finds the smallest
rectangle, with sides parallel to the coordinate axes, that contains
all the points, and returns it as a window.

##### Value

- A window (an object of class
`"owin"`

).

##### See Also

##### Examples

```
x <- runif(30)
y <- runif(30)
w <- bounding.box.xy(x,y)
plot(owin(), main="bounding.box.xy(x,y)")
plot(w, add=TRUE)
points(x,y)
X <- rpoispp(30)
plot(X, main="bounding.box.xy(X)")
plot(bounding.box.xy(X), add=TRUE)
```

*Documentation reproduced from package spatstat, version 1.15-2, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.