roundrect | R Documentation |
adds a rectangular box with rounded left and right edges to a plot
roundrect(mid, radx, rady, rx = rady, dr = 0.01,
col = "white", lcol = "black", lwd = 2, angle = 0, ...)
mid |
midpoint (x,y) of the box. |
radx |
horizontal radius of the box. |
rady |
vertical radius of the box. |
rx |
radius of rounded part. |
dr |
size of segments, in radians, to draw the rounded line (decrease for smoother). |
col |
fill color of the box. |
lcol |
line color surrounding box. |
lwd |
line width of line surrounding the box. |
angle |
rotation angle, degrees. |
... |
arguments passed to function filledshape. |
radx
and rady
are the horizontal and vertical radiusses of
the box; rx
is the horizontal radius of the rounded part.
Here horizontal
and vertical
denote the position BEFORE
rotation.
Karline Soetaert <karline.soetaert@nioz.nl>
emptyplot(c(-0.1, 1.1), main = "roundrect")
for (i in 1:10)
roundrect(mid = runif(2), col = i, radx = 0.1, rady = 0.05)
for (i in 1:5)
roundrect(mid = runif(2), col = greycol(20), radx = 0.05,
rady = 0.05, angle = runif(1)*360)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.