Skip to contents

Create a primitive grab (leaf node)

Usage

grab_atom(
  shape,
  data,
  viewport = NULL,
  node_id = "",
  coordinate_space = "local",
  transform = NULL,
  dirty = TRUE,
  meta = list()
)

Arguments

shape

Character. One of prim_shapes().

data

A data.frame or tibble. Positional columns in [0,1].

viewport

A viewport or NULL to inherit from parent.

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_atom object.

Examples

grab_atom("point", tibble::tibble(x = c(0.2, 0.8), y = c(0.5, 0.3),
                                  colour = c("red", "blue")))
#> Error in grab_atom("point", tibble::tibble(x = c(0.2, 0.8), y = c(0.5,     0.3), colour = c("red", "blue"))): could not find function "grab_atom"