svg_text {omsvg} | R Documentation |
Addition of a text
element
Description
The svg_text()
function adds text to an svg
object. As with many of the
functions that create shape elements (such as svg_rect()
), the starting
position is defined by x
and y
values. All point positions are in units
of px
.
Usage
svg_text(
svg,
x,
y,
text,
fill = NULL,
opacity = NULL,
path = NULL,
attrs = list(),
anims = list(),
filters = list(),
id = NULL
)
Arguments
svg |
The |
x , y |
The |
text |
A character vector that contains the text to be rendered. |
fill |
The color of the text. |
opacity |
The opacity of the element. Must be a value in the
range of |
path |
A single-length character vector that holds the formatted path string. |
attrs |
A presentation attribute list. The helper function
|
anims |
An animation directive list for the element. This should be
structured using the |
filters |
A filter directive list for the element. This is easily
created by using a list of |
id |
An optional ID value to give to the built tag. This is useful for modifying this element in a later function call or for interacting with CSS. |
Value
An svg
object.