AgEdge-class {Rgraphviz} | R Documentation

## 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

`splines`:
  Object of class `"list"` A list of `BezierCurve` objects
`sp`:
  Object of class `"xyPoint"` The starting point of the edge.
`ep`:
  Object of class `"xyPoint"` The end point of the edge.
`head`:
  Object of class `"character"` The head node for this edge.
`tail`:
  Object of class `"character"` The tail node for this edge.
`arrowhead`:
  Object of class `"character"` The style of arrowhead for this edge.
`arrowtail`:
  Object of class `"character"` The style of arrowtail for this edge.
`arrowsize`:
  Object of class `"character"` A scale factor for the length of the arrow heads & tails

### 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

`Ragraph`, `BezierCurve`, `xyPoint`

### 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)

[Package Rgraphviz version 1.16.0 Index]