new_free | R Documentation |
A free polygon shape is a polygon of arbitrary shape defined by any sequence of x-y pairs where the last x-y pair is connected to the first x-y pair to close the polygon.
new_free(pj, x, y, region = ".", look = NULL, mod = NULL, name = ".")
pj |
an object of class |
x |
numeric vector defining the horizontal location of each vertex. The
longer of |
y |
numeric vector defining the vertical location of each vertex. The
longer of |
region |
either character scalar |
look |
an optional list containing up to four lists specifying looks to
apply to the shape. See the using |
mod |
an optional list containing up to four lists specifying
modifications to apply to the shape. See the using |
name |
character scalar indicating a name for the shape. The special
value |
pj
with the addition of the specified free polygon shape.
The argument set {x, y}
is recycled.
look
to make shapes appearBy itself, this function
simply defines the location of x-y pairs in the assigned region for the
specified shape. Various looks can be added to the shape using the
look
parameter or via the add_ends
,
add_fills
, add_glyphs
,
add_labels
, add_lines
, and
add_marks
functions. Sub-lists of the look argument must be
named 'end'
, 'fill'
, 'glyph'
, 'label'
,
'line'
, and/or 'mark'
to indicate that line end marks, fill
colors, glyphs (single characters), labels, lines, and/or point marks be
added to the shape.
mod
to transform shapesShapes can be transformed in
four ways: dilation, reflection, rotation, and translation/. using the
mod
argument or the mod_dilate
,
mod_reflect
, mod_rotate
, and
mod_translate
. Sub-lists of the mod
argument must be
named 'dilate'
, 'reflect'
, 'rotate'
, and/or
'translate'
to indicate that a dilation, reflection, rotation, and
or translation be applied to the shape.
Other new_polygons:
new_polys()
,
new_regulars()
,
new_stars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.