# coordinates given by a suitable data frame
bb <- getBoundingBox(DFsavage)
# draw points and bounding box
plot(point.y ~ point.x, data=DFsavage, asp=1, pch=16)
drawBox(bb, fg='blue', colCtr='blue', pch=4, cex=2)
bb$FoM # figure of merit
# coordinates given by a matrix
## Not run:
# xy <- matrix(round(rnorm(20, 100, 15), 1), ncol=2)
# getBoundingBox(xy)
# ## End(Not run)
Run the code above in your browser using DataLab