RagraphBPH-class {hyperdraw}R Documentation

Class "RagraphBPH"

Description

The purpose of this class is to represent a laid out version of a graphBPH object. The laying out is performed by the Rgraphviz package. This is an intermediate step in the process of drawing a graphBPH object.

Objects from the Class

Objects of this class should be created via the graphLayout() function.

Slots

graph:

Object of class Ragraph. The laid out graph.

allNodes:

Object of class character. The names of all nodes in the graph.

nodes:

Object of class character. Records normal nodes in the graph.

edgeNodes:

Object of class character. Records edge-nodes in the graph.

edgeNodeIO:

Object of class list. Records which edges enter and exit each edge-node.

Methods

plot

signature(x = "RagraphBPH", y = "ANY"): draw a representation of the hypergraph where edges between normal nodes in the graph pass through an intermediate edge-node in a nice smooth curve.

edgeDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for all edges.

edgeData<-

signature(self = "RagraphBPH", from = "character", to = "character", attr = "character", value = "ANY"): set a specific drawing attribute for one or more edges.

nodeDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for all nodes.

nodeData<-

signature(self = "RagraphBPH", n = "character", attr = "character", value = "ANY"): set a specific attribute for one or more nodes.

graphDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for the graph.

graphData<-

signature(self = "RagraphBPH", n = "character", attr = "character", value = "ANY"): set a specific attribute for the graph.

Author(s)

Paul Murrell

See Also

graphLayout, graphBPH, and Ragraph

Examples

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 <- graphBPH(testgnel, "^R")
testrabph <- graphLayout(testbph)
edgeDataDefaults(testrabph, "lwd") <- 1
edgeData(testrabph, c("A", "R1"), c("R1", "B"), "lwd") <- c("3", 5)
edgeDataDefaults(testrabph, "color") <- "black"
edgeData(testrabph, c("A", "R1"), c("R1", "B"), "color") <- "red"
nodeDataDefaults(testrabph, "margin") <- 'unit(2, "mm")'
nodeDataDefaults(testrabph, "shape") <- "circle"
plot(testrabph)
graphDataDefaults(testrabph, "arrowLoc") <- "middle"
graphData(testrabph, "arrowLoc") <- "end"
plot(testrabph)
graphData(testrabph, "arrowLoc") <- "none"
plot(testrabph)

[Package hyperdraw version 1.42.0 Index]