diamond | R Documentation |
Draw diamonds on the graphics device.
diamond(x, y = NULL, radius, ...)
x, y |
Position(s) of the centers of the diamonds. |
radius |
Distances from the center to the vertex. |
... |
Further arguments passed to |
x
and y
can be passed to diamond
in any form recognized by xy.coords
(e.g. individual vectors, list, data frame, formula).
Only “square” (equilateral) diamonds are implemented here.
rect
plot(1:10)
diamond(1:10, rep(3, 10), radius = 0.4)
diamond(3, 8, 1, border = 3)
diamond(1:10, rep(5, 10), radius = seq(0.1, 1, length = 10), col = 1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.