renderGraph {Rgraphviz}R Documentation

Render a laid out graph object

Description

This method uses the renderInfo slot of a graph object to render it on a plotting device.

Usage

## S4 method for signature 'graph':
renderGraph(x, drawNodes, drawEdges, graph.pars)

Arguments

x An object derived from class graph
drawNodes A function that is used for the node rendering. The details of its API are still undecided. Defaults to renderNodes
drawEdges A function that is used for the edge rendering. Defaults to renderNodes
graph.pars A list of rendering paramters to use as default
... further arguments

Details

This method can render graph objects that have previously been laid out using the function layoutGraph. The details for user defined node drawing remain to be decided.

Value

An object derived from class graph with information about the coordinates of the nodes in the coordinate system of the plotting device added to the renderInfo slot.

Author(s)

Florian Hahne

See Also

layoutGraph

Examples

  library(graph)
  set.seed(123)
  V <- letters[1:10]
  M <- 1:4
  g1 <- randomGraph(V, M, 0.8)
  x <- layoutGraph(g1)
  x <- renderGraph(x)
  graphRenderInfo(x,"nativeCoords")

[Package Rgraphviz version 1.20.4 Index]