grid.segments {grid} | R Documentation |
These functions create and draw line segments.
grid.segments(x0 = unit(0, "npc"), y0 = unit(0, "npc"), x1 = unit(1, "npc"), y1 = unit(1, "npc"), default.units = "npc", arrow = NULL, 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", arrow = NULL, name = NULL, gp = gpar(), vp = NULL)
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. |
arrow |
A list describing arrow heads to place at either end
of the line segments, as produced by the |
name |
A character identifier. |
gp |
An object of class |
draw |
A logical value indicating whether graphics output should be produced. |
vp |
A Grid viewport object (or NULL). |
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
).
A segments grob. grid.segments
returns the value invisibly.
Paul Murrell