Description Usage Arguments Value Examples
This function can generate a polygon form SVG element The <polygon> element defines a closed shape consisting of a set of connected straight line segments. The last point is connected to the first point. For open shapes see the <polyline> element.
1 2 | polygon.svg(points = NULL, fill, fill.opacity, stroke, stroke.width,
stroke.opacity, fill.rule, style.sheet = NULL)
|
points |
a matrix, a series of coordinates |
fill |
a character, color of the polygon, eg. "#000000"(default), "red" |
fill.opacity |
a number, stroke opacity of the polygon, default:1. If the fill opacity is 0, the polygon's internal color is invisible |
stroke |
a characher, color of the polygon line, eg. "#000000"(default), "red" |
stroke.width |
a number, stroke width of the polygon line, default: 1 |
stroke.opacity |
a number, stroke opacity of the polygon line, default:1. If the stroke opacity is 0, the polygon line is invisible |
fill.rule |
a character, fill rule of polygon, eg. "nonzero", "evenodd" |
style.sheet |
a vector or a chatacter, other style of the polygon, eg. "stroke-linecap: round" |
the characher type of SVG element
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.