grid.grob {grid}R Documentation

Create a Grid Graphical Object

Description

Creates a Grid graphical object.

Usage

grid.grob(list.struct, cl = NULL, draw = TRUE)

Arguments

list.struct A list (preferably with each element named).
cl A string giving the class attribute for the list.struct
draw A logical value to indicate whether to produce graphical output.

Details

A Grid graphical object provides a pointer to the list.struct. This has the important consequence that copies of the graphical object refer to the same list.struct.

All Grid primitives (grid.lines, grid.rect, ...) and some higher-level Grid functions (e.g., grid.xaxis and grid.yaxis) return graphical objects.

Grid provides several useful functions for graphical objects (e.g., grid.draw and grid.edit) which are designed to make it easier to produce new graphical objects.

Value

An object of class "grob".

Author(s)

Paul Murrell

See Also

grid.draw, grid.edit, grid.get, grid.copy.

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"))
# Copy by value
l3 <- grid.copy(l)

[Package Contents]