Skip to contents

Create a bag grab (interior node)

Usage

grab_bag(
  children = list(),
  viewport = NULL,
  aesthetics = NULL,
  name = "",
  node_id = "",
  coordinate_space = "local",
  transform = NULL,
  dirty = TRUE,
  meta = list()
)

Arguments

children

A list of grab_atom or grab_bag objects.

viewport

A viewport or NULL to inherit from parent.

aesthetics

An aes_spec or NULL. Values inherited by all children.

name

Character. Optional label for debugging.

node_id

Character node identifier. If empty, one can be assigned with assign_node_ids().

coordinate_space

Character coordinate space label for this node.

transform

Optional transform list (tx, ty, sx, sy, rotate) applied in local space.

dirty

Logical dirty flag used by rendering caches.

meta

Optional free-form metadata list.

Value

A grab_bag object.

Examples

grp <- grab_bag(
  children   = list(grab_atom("point", tibble::tibble(x=0.5, y=0.5))),
  aesthetics = aes_spec(alpha = 0.8)
)
#> Error in grab_bag(children = list(grab_atom("point", tibble::tibble(x = 0.5,     y = 0.5))), aesthetics = aes_spec(alpha = 0.8)): could not find function "grab_bag"