group.svg {easySVG}R Documentation

make svg group

Description

The <g> SVG element is a container used to group other SVG elements. Transformations applied to the <g> element are performed on all of its child elements, and any of its attributes are inherited by its child elements. It can also group multiple elements to be referenced later with the <use> element.

Usage

group.svg(id = NULL, group.content = NULL, fill, fill.opacity, stroke,
  stroke.width, stroke.opacity, stroke.dasharray, font.family, font.size,
  font.weight, font.style, text.decoration, word.spacing, letter.spacing,
  text.anchor, scale, rotate, translate, skewX, skewY, style.sheet = NULL,
  transform.sheet = NULL)

Arguments

id

a character, group id

group.content

a character or a list or a vector, group content

fill

a character, color of the group, eg. "#000000"(default), "red"

fill.opacity

a number, stroke opacity of the group, default:1. If the fill opacity is 0, the rect's internal color is invisible

stroke

a characher, color of the group line, eg. "#000000"(default), "red"

stroke.width

a number, stroke width of the group line, default: 1

stroke.opacity

a number, stroke opacity of the group line, default:1. If the stroke opacity is 0, the line is invisible

stroke.dasharray

a vector, plot the dotted group line, eg. c(9, 5)

font.family

a character, font family of text, eg. "Arial"

font.size

a number, font size of text, default: 8

font.weight

a character, font weight of text, eg. "normal"(default), "bold"

font.style

a character, font style of text, eg. "normal"(default), "italic"

text.decoration

a character, text decoration, eg. "none"(default), "underline", "overline", "line-through"

word.spacing

a number or character, default: "normal"

letter.spacing

a number or character, defailt: "normal"

text.anchor

a character, eg. "start"(default), "middle", "end"

scale

a number. transform scale of the object

rotate

a vector, rotation of the object

translate

a vector, translate of the object

skewX

a number

skewY

a number

style.sheet

a vector or a chatacter, other style of the group, eg. "stroke-linecap: round"

transform.sheet

a vector or a chatacter, other transform of the group

Value

the characher type of SVG element

Examples

group.svg(id = "group_1", group.content = "this is a svg element")
group.content <- list(svg1 = "this is a svg element",
                      svg2 = "this is a svg element")
group.svg(id = "group_1", group.content = group.content)
group.svg(id = "group_1", group.content = group.content,
          style.sheet = c("stroke:red", "stroke-width:1"),
          transform.sheet = c("translate(100, 100)"))


[Package easySVG version 0.1.0 Index]