Calculate the points on the convex hull.
chull.points <- function(d,...){ bpts <- d[with(d,chull(x,y)),] r <- data.frame(i1=1:nrow(bpts),i2=c(2:nrow(bpts),1)) r$x1 <- bpts$x[r$i1] r$y1 <- bpts$y[r$i1] r$x2 <- bpts$x[r$i2] r$y2 <- bpts$y[r$i2] r }
Please contact Toby Dylan Hocking if you are using directlabels or have ideas to contribute, thanks! |
Documentation website generated from source code version 2021.2.24 (git revision bb6db07 Mon, 14 Jun 2021 22:38:45 +0530) using inlinedocs. |
validate |