diamond: Draw diamonds

Description Usage Arguments Details See Also Examples

View source: R/distogram.R

Description

Draw diamonds on the graphics device.

Usage

1
diamond(x, y = NULL, radius, ...)

Arguments

x, y

Position(s) of the centers of the diamonds.

radius

Distances from the center to the vertex.

...

Further arguments passed to polygon (e.g. col, border).

Details

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.

See Also

rect

Examples

1
2
3
4
5
 
  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)

squash documentation built on Feb. 20, 2020, 9:08 a.m.