bounding.box.xy | R Documentation |
Computes the smallest rectangle containing a set of points.
bounding.box.xy(x, y=NULL)
x |
vector of |
y |
(optional) vector of |
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.
A window (an object of class "owin"
).
and \rolf
owin
,
as.owin
,
convexhull.xy
,
ripras
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 <- runifrect(30)
plot(X, main="bounding.box.xy(X)")
plot(bounding.box.xy(X), add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.