R: Importing an external coordinate system

Coordinate System Import/Export {gridSVG} | R Documentation

## Importing an external coordinate system

### Description

This function is both a getter and a setter function for coordinate information imported from a plot unknown to the current R session.

### Usage

    gridSVGCoords(newcoords = NULL)

### Arguments

`newcoords` | A named list (names are viewport names) of coordinate information, produced by `grid.export`.

### Details

In order to translate between SVG coordinates and the coordinate system that `grid` understands, we first need to import the coordinate information exported from `grid.export`. We can then take the JSON representation of this coordinate information and import it as a named list via `fromJSON`. This can then initialise a coordinate system by passing that named list into `gridSVGCoords`.

We can supply new definitions of a viewport's coordinate system by simply passing in an appropriate list with information for that viewport.

All viewport coordinate system information can be wiped if a single `NA` value is passed in.

### Value

If `newcoords` is `NULL`, then we get back a named list representing coordinate system information.

If we pass the named list representing a coordinate system into the function, we get no output. We also get no output if we pass in a single `NA` value.

### Author(s)

Simon Potter

[Package gridSVG version 1.6-0 Index]