R/labelposition.R

Defines functions labelposition

labelposition <- function(r=0.5,start=start, end=end, distance=1.2){
  label.position <- pi*rowMeans(cbind(start, end))
  df <- data.frame(
    x = distance*r* cos(label.position),
    y = distance*r* sin(label.position), stringsAsFactors = T
  )
  df
}

Try the patternplot package in your browser

Any scripts or data that you put into this service are public.

patternplot documentation built on April 21, 2020, 5:05 p.m.