getViewBox: Get the dimensions of the viewing area/box of an SVG document

Description Usage Arguments Value Author(s) See Also Examples

Description

This queries the SVG document to fetch and parse the viewBox attribute of the root svg node.

Usage

1

Arguments

doc

the parsed XML/SVG document

Value

It returns a 2-by-2 matrix giving the x and y coordinates in the first and second columns, with the top being in the first row.

Author(s)

Duncan Temple Lang

See Also

enlargeSVGViewBox dim,SVGDocument-method

Examples

1
2
3
4
5
6
7
 doc = svgPlot(plot(1:10))
 getViewBox(doc)
 dim(doc)

 doc = svgPlot(plot(1:10), width = 8, height = 11.5)
 getViewBox(doc)
 dim(doc)

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