new_segments | R Documentation |
A segments shape is a collection of lines between two points
(each) that use the same subset of locating arguments (x
, y
,
x2
, y2
, m
, s
, a
, and au
).
new_segments( pj, x1, y1, x2 = NA, y2 = NA, d = NA, s = NA, a = NA, au = "r", region = ".", look = NULL, mod = NULL, name = "." )
pj |
an object of class |
x1 |
numeric vector giving the horizontal start point of each segment. |
y1 |
numeric vector giving the vertical start point of each segment. |
x2 |
|
y2 |
|
s |
|
a |
|
au |
|
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 |
m |
|
pj
with the addition of the specified line segment shape(s).
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_glyphs
, add_labels
,
add_lines
, and add_marks
functions. Sub-lists
of the look argument must be named 'end'
, '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.
The argument set {x1, y1, x2, y2, m, s,
a, au}
is recycled.
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_simples:
new_points()
,
new_reflines()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.