internal: Low-level functions for working with SVG plots from R

Description Usage Arguments Value Author(s)

Description

This is a collection of functions that others may want to use to post-process SVG plots created with R's cairo graphics device.

setIds arranges to set an idattribute on each of the nodes. This can be used in subsequent processing of SVG content and most importantly in ECMAscript code that works with the SVG elements at view/run time.

Usage

1
2
setIds(nodes, ids = seq(along = nodes), fix = c("", ""),
        sep = if (fix[1] == "") "" else "-")

Arguments

nodes

the SVG element nodes

ids

characters giving the values of the identifiers for the nodes. They should be unique.

fix

a prefix and suffix.

sep

separtor used between the prefix and suffix and the ids.

Value

The identifiers strings.

Author(s)

Duncan Temple Lang


duncantl/SVGAnnotation documentation built on May 15, 2019, 5:57 p.m.