mod_reflect | R Documentation |
A reflection modification reflects a shape around a reference line. Reflections are not valid for refline shapes.
mod_reflect( pj, ref = "h", x1 = NA, y1 = NA, x2 = NA, y2 = NA, s = NA, i = NA, a = NA, au = "r", shape = ".", name = "." )
pj |
an object of class |
ref |
|
x1 |
|
y1 |
|
x2 |
|
s |
|
i |
|
a |
|
au |
|
shape |
character scalar indicating the type of shape to which the mod will be applied. |
name |
character scalar name to give to the specified mod. The special
value |
pj
with the reflection modification applied to the specified
shape.
'i'
indicates reflection across the identity line,
'x'
indicates reflection across the x-axis,
'y'
indicates reflection across the y-axis,
'l'
indicates reflection across the vertical line through
the left edge of a shape's bounding rectangle,
'r'
indicates reflection across the vertical line through
the right edge of a shape's bounding rectangle,
'b'
indicates reflection across the horizontal line through
the bottom edge of a shape's bounding rectangle,
't'
indicates reflection across the horizontal line through
the top edge of a shape's bounding rectangle,
'h'
indicates horizontal reflection across the vertical
midline of the shape's bounding rectangle.
'v'
indicates vertical reflection across the horizontal
midline of the shape's bounding rectangle.
'd'
indicates reflection across the line through th
downward diagonal between the top-left and bottom-right
corners of a shape's bounding rectangle, and
'u'
indicates reflection across the line through the upward
diagonal between to bottom-left and top-right corners of
a shape's bounding rectangle.
Valid combinations of non-NA
locating arguments are given below.
ref
Pre-defined reference line
x1
Vertical line at x1
.
y1
Horizontal line at y1
.
x1 + y1 + x2 + y2
Point-point definition (line through
(x1, y1)
and (x2, y2)
).
x1 + y1 + a
Point-angle definition (line through
(x1, y1)
at angle a
).
x1 + y1 + i
Point-intercept definition (line through
intercept and (x1, y1)
).
x1 + y1 + s
Point-slope definition (line through
(x1, y1)
with slope s
).
a + i
Angle-intercept definition (line through intercept at
angle a
).
s + i
Slope-intercept definition (line through intercept
with slope s
).
The argument set {x, y, ref, s, i, x2, y2,
a, au, xu, yu}
is recycled with the number of subshapes defined for a
given shape. For point, area, and ribbon shapes, all arguments in the set
must be scalar. For segment shapes, arguments in the set must be recyclable
with the number of segments defined by that shape. For shapes that define
polygons, arguments in the set must be recyclable with the number of
polygons defined by the shape.
Other add_mod:
mod_dilate()
,
mod_rotate()
,
mod_translate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.