gEdit {grid} | R Documentation

## Create and Apply Edit Objects

### Description

The functions `gEdit` and `gEditList` create objects representing an edit operation (essentially a list of arguments to `editGrob`).

The functions `applyEdit` and `applyEdits` apply one or more edit operations to a graphical object.

These functions are most useful for developers creating new graphical functions and objects.

### Usage

    gEdit(...)
    gEditList(...)
    applyEdit(x, edit)
    applyEdits(x, edits)

### Arguments

`...` | one or more arguments to the `editGrob` function (for `gEdit`) or one or more `"gEdit"` objects (for `gEditList`).
`x` | a grob (grid graphical object).
`edit` | a `"gEdit"` object.
`edits` | either a `"gEdit"` object or a `"gEditList"` object.

### Value

`gEdit` returns an object of class `"gEdit"`.

`gEditList` returns an object of class `"gEditList"`.

`applyEdit` and `applyEditList` return the modified grob.

### Author(s)

Paul Murrell

### See Also

`grob` `editGrob`

### Examples

    grid.rect(gp=gpar(col="red"))
    # same thing, but more verbose
    grid.draw(applyEdit(rectGrob(), gEdit(gp=gpar(col="red"))))

[Package grid version 2.15.1 Index]