powered by
Draw diamonds on the graphics device.
diamond(x, y = NULL, radius, ...)
Position(s) of the centers of the diamonds.
Distances from the center to the vertex.
Further arguments passed to polygon (e.g. col, border).
polygon
col
border
x and y can be passed to diamond in any form recognized by xy.coords (e.g. individual vectors, list, data frame, formula).
x
y
diamond
xy.coords
Only “square” (equilateral) diamonds are implemented here.
rect
# NOT RUN { 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) # }
Run the code above in your browser using DataLab