Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

AgEdge-class

Class "AgEdge": A class to describe an edge for a Ragraph object


Description

This class is used to represent edges for the Ragraph class. One can retrieve various pieces of information as well as draw them.

Objects from the Class

Objects can be created by calls of the form new("AgEdge", ...).

Slots

arrowhead:

Object of class "character" The style of arrowhead for this edge.

arrowsize:

Object of class "character" A scale factor for the length of the arrow heads & tails

arrowtail:

Object of class "character" The style of arrowtail for this edge.

color:

Object of class "character" The edge color.

dir:

Object of class "character" The edge direction.

ep:

Object of class "xyPoint" The end point of the edge.

head:

Object of class "character" The head node for this edge.

lty:

Object of class "character" The edge line type.

lwd:

Object of class "numeric" The edge line width.

sp:

Object of class "xyPoint" The starting point of the edge.

splines:

Object of class "list" A list of BezierCurve objects

tail:

Object of class "character" The tail node for this edge.

txtLabel:

Object of class "character" The edge text label.

Methods

splines

Returns the splines slot

sp

Returns the sp slot

ep

Returns the ep slot

numSplines

Returns the number of splines

getSpline

Convenience method to retrieve a specific spline

show

Displays a concise description of the object

lines

Draws the edge

head

Gets the head slot

tail

Gets the tail slot

txtLabel

Returns any label for this edge

arrowhead

Retrieves the arrowhead slot.

arrowtail

Retrieves the arrowtail slot.

arrowsize

Retrieves the arrowsize slot.

Author(s)

Jeff Gentry

See Also

Examples

V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1,name="foo")
x <- AgEdge(z)  ## list of AgEdge objects

vv <- x[[1]]
vv
## Demonstrate the methods of this class
splines(vv)
sp(vv)
ep(vv)
numSplines(vv)
getSpline(vv, 1)
head(vv)
tail(vv)
txtLabel(vv)
arrowhead(vv)
arrowtail(vv)
arrowsize(vv)

Rgraphviz

Provides plotting capabilities for R graph objects

v2.34.0
EPL
Authors
Kasper Daniel Hansen [cre, aut], Jeff Gentry [aut], Li Long [aut], Robert Gentleman [aut], Seth Falcon [aut], Florian Hahne [aut], Deepayan Sarkar [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.