directlabels - utility.function - Positioning Method - polygon.method

Make a Positioning Method that places non-overlapping speech polygons at the first or last points.

polygon.method <- function(method, space, data.col, na.col){
  list(method, "calc.boxes",
         for(xy in c("x", "y")){
           d[[sprintf("%s.%s", data.col, xy)]] <- d[[xy]]
           d[[sprintf("%s.%s", na.col, xy)]] <- NA
         d$x <- d$x + space
       qp.labels("y","bottom","top", make.tiebreaker("x","y"), ylimits),
       "calc.borders", draw.polygons)
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.