# ===============================
# test function
# load test data
data(p)
p1 <- p +
ggplot2::theme(plot.margin = ggplot2::margin(t = 2,unit = 'cm'))
# default plot
annoTriangle(object = p1,
annoPos = 'top',
xPosition = c(0,10.5))
# ajust yposition
annoTriangle(object = p1,
annoPos = 'top',
xPosition = c(0.5,10.5),
yPosition = c(10.8,11.5))
# add border
annoTriangle(object = p1,
annoPos = 'top',
xPosition = c(0.5,10.5),
yPosition = c(10.8,11.5),
addBorder = TRUE,
lwd = 2.5)
Run the code above in your browser using DataLab