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",
function(d,...){
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
d
},
"reduce.cex.lr",
dl.trans(h=h*1.5),
"calc.borders",
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. |
| validate |