M() and mm() move the "pen" to a new point.
Usage
M(
x,
y = NULL,
...,
sep = getOption("dee.sep", ","),
origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
height = getOption("dee.height", NULL),
digits = getOption("dee.digits", Inf)
)
mm(
x,
y = NULL,
...,
sep = getOption("dee.sep", ","),
origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
height = getOption("dee.height", NULL),
digits = getOption("dee.digits", Inf)
)
MZ(...)
mz(...)Arguments
- x
If
yisNULLwill be coerced byaffiner::as_coord2d(). Else a numeric vector.- y
Either
NULLor a numeric vector.- ...
Passed to related function.
- sep
Either
","or" ".- origin_at_bottom, height
If
origin_at_bottomisTRUEtheny(and anyy1andy2) coordinates is transformed byheight - yfor absolute coordinates and-yfor relative coordinates.- digits
xandy(and anyx1,y1,x2,y2) will be transformed byround(, digits). AnInf(default) means no rounding.
Value
A dee() object.
Examples
M(1, 1) + L(2, 2) + Z()
#> <dee[1]>
#> M 1,1 L 2,2 Z
M(1, 1) + ll(1, 1) + zz()
#> <dee[1]>
#> M 1,1 l 1,1 z
d <- MZ(x = c(2, 5, 8, 5), y = c(5, 8, 5, 2))
if (requireNamespace("omsvg", quietly = TRUE) &&
requireNamespace("nanosvgr", quietly = TRUE)) {
plot(d, height = 10, width = 10,
fill = "red", stroke = "black", stroke_width = 4)
}