annotate_regpolygon | R Documentation |
ggplot2::annotate()
annotate_regpolygon()
is a shortcut of ggplot2::annotate("polygon")
to draw a regular polygon.
annotate_regpolygon(
n,
radius = 1,
x = 0,
y = 0,
start = pi/2,
linewidth = 0,
color = "#333333",
fill = "#666666",
...
)
n |
number of sides |
radius |
size of polygon |
x , y |
center coordinate |
start |
angle of the starting point |
linewidth , color |
passed to |
fill , ... |
passed to |
ggplot2::ggplot() +
annotate_regpolygon(6L, radius = 5, linewidth = 6, color = "#333333", fill = "#ffffff") +
annotate_regpolygon(6L, radius = 2, fill = "#C41A41") +
ggplot2::coord_fixed()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.