grid.lines {grid}R Documentation

Draw Lines in a Grid Viewport

Description

These functions create and draw a series of lines.

Usage

grid.lines(x = unit(c(0, 1), "npc", units.per.obs),
       y = unit(c(0, 1), "npc", units.per.obs), 
       default.units = "npc", units.per.obs = FALSE, name = NULL,
       gp=gpar(), draw = TRUE, vp = NULL)
linesGrob(x = unit(c(0, 1), "npc", units.per.obs),
       y = unit(c(0, 1), "npc", units.per.obs), 
       default.units = "npc", units.per.obs = FALSE, name = NULL,
       gp=gpar(), vp = NULL)

Arguments

x A numeric vector or unit object specifying x-values.
y A numeric vector or unit object specifying y-values.
default.units A string indicating the default units to use if x or y are only given as numeric vectors.
units.per.obs A logical value to indicate whether each individual (x, y) location has its own unit(s) specified.
name A character identifier.
gp An object of class gpar, typically the output from a call to the function gpar. This is basically a list of graphical parameter settings.
draw A logical value indicating whether graphics output should be produced.
vp A Grid viewport object (or NULL).

Details

Both functions create a lines grob (a graphical object describing lines), but only grid.lines draws the lines (and then only if draw is TRUE).

Value

A lines grob. grid.lines returns the value invisibly.

Author(s)

Paul Murrell

See Also

Grid, viewport


[Package grid version 2.2.1 Index]