powered by
getBoundingBox(xy)
xleft
ybottom
xright
ytop
rect
drawBox
getMinBBox
getMinCircle
xy <- matrix(round(rnorm(20, 100, 15), 1), ncol=2) bb <- getBoundingBox(xy) plot(xy, pch=16) drawBox(bb$pts[1], bb$pts[2], bb$pts[3], bb$pts[4], fg='blue', colCtr='blue', pch=4, cex=2)
Run the code above in your browser using DataLab