brace | R Documentation |
Draw brace
brace(x1 = 0, y1 = 0, x2 = 0, y2 = 1, right = TRUE, rad = 0.2, tip = FALSE)
brace_(...)
x1 |
y1, x1, y2 endpoints of brace |
right |
(default TRUE) direction in which brace points |
rad |
(default 0.2) radius of curl of brace |
tip |
the tip of the brace (default FALSE) |
the coordinates of the point of the brace, invisibly
brace_()
: default tip = TRUE
Georges Monette, Michael Friendly
plot(c(0,10), c(0,10), type = 'n')
lines(brace(0, 0, 0, 5), lwd = 2)
text(brace(0, 0, 0, 5, tip = T),"size", adj = c(-.1,.3))
lines(brace(2, 0, 8, 5, right = F), lwd = 2)
text(brace_(2, 0, 8, 5, right = F), 'tip')
text(brace_(2, 0, 8, 5, right = F), 'tip', adj = c(.5,-.3), col = 'red')
plot(c(0,10),c(0,1))
brace(5,0,5,1) %>% lines
lapply(1:10, function(x) {
lines(brace(x,0,x,.1*x,F))
lines(brace(x,0,x-.2*x,.1*x,F),col = 'red')
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.