This help topic is for R version 2.0.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/grid/html/grid.segments.html
grid.segments {grid}R Documentation

Draw Line Segments

Description

These functions create and draw line segments.

Usage

grid.segments(x0 = unit(0, "npc"), y0 = unit(0, "npc"),
              x1 = unit(1, "npc"), y1 = unit(1, "npc"),
              default.units = "npc", units.per.obs = FALSE,
              name = NULL, gp = gpar(), draw = TRUE, vp = NULL)
segmentsGrob(x0 = unit(0, "npc"), y0 = unit(0, "npc"),
              x1 = unit(1, "npc"), y1 = unit(1, "npc"),
              default.units = "npc", units.per.obs = FALSE,
              name = NULL, gp = gpar(), vp = NULL)

Arguments

x0

Numeric indicating the starting x-values of the line segments.

y0

Numeric indicating the starting y-values of the line segments.

x1

Numeric indicating the stopping x-values of the line segments.

y1

Numeric indicating the stopping y-values of the line segments.

default.units

A string.

units.per.obs

A boolean indicating whether distinct units are given for each x/y-value.

name

A character identifier.

gp

An object of class gpar.

draw

A logical value indicating whether graphics output should be produced.

vp

A Grid viewport object (or NULL)

Details

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

Value

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

Author(s)

Paul Murrell

See Also

Grid, viewport


[Package grid version 2.0.0 ]