R: Draw diamonds

diamond {squash} | R Documentation

## Draw diamonds

### Description

Draw diamonds on the graphics device.

### Usage

    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

      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)

[Package squash version 1.0.8 Index]