grid.copy {grid}R Documentation

Make a Copy of a Grid Graphical Object

Description

Grid graphical objects are references to list structures, which means that copies of graphical objects ``point'' to the same list structure.

This function copies graphical objects by value, which means that the copy ``points'' to a separate list structure.

Usage

grid.copy(grob)

Arguments

grob An object of class "grob".

Value

An object of class "grob".

Author(s)

Paul Murrell

See Also

grid.grob.

Examples

# Create a graphical object
l <- grid.lines(draw=FALSE)
# View the list.struct
grid.get(l)
# Copy by reference
l2 <- l
# Edit the common list.struct
grid.edit(l2, gp=gpar(col="green"))
# We have modified "l"
grid.get(l)
# Copy by value
l3 <- grid.copy(l)

[Package Contents]