pos_polygon: Return positions for equilateral polygon vertices

View source: R/pos_polygon.R

pos_polygonR Documentation

Return positions for equilateral polygon vertices

Description

Return positions for equilateral polygon vertices

Usage

pos_polygon(x0 = 0, y0 = 0, n = 5, radius = 1, rotation = -0.5)

Arguments

x0

numeric x center of shape, defaults to 0

y0

numeric y center of shape, defaults to 0

n

number of positions

radius

a numeric value, the distance between x0 and y0 and the vertices

rotation

numeric indicating how much polygon should be turned from first vertex along positive horizontal

Examples

pos_polygon()
pos_polygon(n = 10)

# Using w plotspace
ggcanvas() +
stamp_label(label = c("hi", "bye", "tchao"),
            xy = pos_polygon(n = 3,
            rotation = -.5,
            radius = .5))

EvaMaeRey/ggstamp documentation built on June 30, 2022, 11 p.m.