Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

grid.symbols

Draw a Picture Object as Data Symbols


Description

These functions take a "Picture" object and either draw the picture at several locations or create a grid graphical object representing the picture (drawn at several locations).

Usage

symbolsGrob(picture,
            x = stats::runif(10), y = stats::runif(10),
            size = unit(1, "char"),
            default.units = "native",
            gpFUN = identity,
            ext = c("none", "clipbbox", "gridSVG"),
            prefix = NULL,
            ..., name = NULL)
grid.symbols(...)

Arguments

picture

A "Picture" object.

x

A numeric vector or unit object specifying x-locations.

y

A numeric vector or unit object specifying y-locations.

size

A numeric vector or unit object specifying symbol sizes.

default.units

A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.

gpFUN

A function that takes a grid gpar object and returns a (possibly modified) gpar object.

ext

A character vector. Selects from one of three possible extensions for drawing imported pictures. "none" means that no clipping will be applied to the imported picture. "clipbbox" means that clipping will be applied, but only to the bounding boxes of any imported clipping paths. "gridSVG" means that gridSVG will be used when drawing the "Picture" object, which enables the use of complex clipping paths, gradients, patterns, etc. to be rendered from an imported picture.

prefix

A character string. A prefix to add to referenced gridSVG content (e.g. pattern fills). Only used when gridSVG is TRUE. The reference label must be a unique reference label, otherwise an error will result. This can be checked by calling gridSVG's listSVGDefinitions(). When this parameter is NULL, a prefix will automatically be generated but this is not guaranteed to be unique.

...

For grid.symbols(), arguments to be passed onto symbolsGrob(). For symbolsGrob(), additional parameters to be passed onto the picture's grobify method.

name

A character identifier.

Value

A grid grob.

Author(s)

Simon Potter

See Also


grImport2

Importing 'SVG' Graphics

v0.2-0
GPL (>= 2)
Authors
Simon Potter [aut], Paul Murrell [aut, cre] (<https://orcid.org/0000-0002-3224-8858>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.