grid.copy {grid} | R Documentation |
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.
grid.copy(grob)
grob |
An object of class "grob" . |
An object of class "grob"
.
Paul Murrell
# 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)