Group

class svgwrite.container.Group(**extra)

The Group (SVG g) element is a container element for grouping together related graphics elements.

Grouping constructs, when used in conjunction with the desc and title elements, provide information about document structure and semantics. Documents that are rich in structure may be rendered graphically, as speech, or as braille, and thus promote accessibility.

A group of elements, as well as individual objects, can be given a name using the id attribute. Named groups are needed for several purposes such as animation and re-usable objects.

SVG Attributes

  • classstring

    assigns one or more css-class-names to an element

  • stylestring

    allows per-element css-style rules to be specified directly on a given element

  • externalResourcesRequiredbool

    False: if document rendering can proceed even if external resources are unavailable else: True

  • transform – use svgwrite.mixins.Transform interface