graphLayout: Layout a graph.

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function is designed to layout a graph using the Rgraphviz package. The hyperdraw package makes this a generic function with a method for graphBPH objects. The function of the same name in the Rgraphviz package is used as a method for Ragraph objects.

Usage

1
graphLayout(graph, layoutType, ...)

Arguments

graph

An graphBPH object, which is to be laid out.

layoutType

The layout method (e.g., dot or neato).

...

These arguments will be passed to the agopen() function.

Value

An RagraphBPH object.

Author(s)

Paul Murrell

References

Gansner, E.R. and and North, S.C. (1999) An open graph visualization system and its applications to software engineering, Software - Practice and Experience, 30:1203–1233.

Gentry, J. and Long, L. and Gentleman, R. and Falcon, S. and Hahne, F. and Sarkar, D. and Hansen, K. Rgraphviz: Provides plotting capabilities for R graph objects.

See Also

agopen and GraphvizLayouts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
nodes <- c(LETTERS[1:5], paste("R", 1:3, sep=""))
testgnel <- new("graphNEL",
                nodes=nodes,
                edgeL=list(
                  A=list(edges=c("R1", "R2")),
                  B=list(edges="R2"),
                  C=list(),
                  D=list(edges="R3"),
                  E=list(),
                  R1=list(edges="B"),
                  R2=list(edges=c("C", "D")),
                  R3=list(edges="E")),
                edgemode="directed")
testbph <- new("graphBPH", testgnel, "^R")
testrabph <- graphLayout(testbph)

Example output



hyperdraw documentation built on Nov. 8, 2020, 11:11 p.m.