classGraph (version 0.7-5)

plotRag: Plot an Ragraph (using Rgraphviz)

Description

Plot an Ragraph object (a kind of “laid-out” graph, from package Rgraphviz). This the simply uses the plot method from package Rgraphviz (i.e., selectMethod(plot, "Ragraph")) and additionally adds a “footnote”-like subtitle.

Usage

plotRag(ragr, sub, subArgs = .optRagargs(), ...)

.optRagargs(side = 1, adj = 0.05, cex = 0.75, line = 3)

Arguments

ragr

an object of class Ragraph (as defined in the Rgraphviz package).

sub

a “footnote” or subtitle to be added to plot(ragr,...). By default gives the number of nodes and edges.

subArgs

a list of arguments to mtext, typically from calling .optRagargs().

...

further arguments passed to plot(.), i.e., the plot method for Ragraph objects.

side, adj, cex, line

arguments passed to mtext() with non-standard defaults in order to place sub, the “sub title”.

Author

Martin Maechler

See Also

mRagraph, Ragraph.

Examples

Run this code
  if(require("Matrix")) {
    trMatrix <- classTree("Matrix")
    trMatrix
    RtrM <- mRagraph(trMatrix)
    RtrM # (the show method will hopefully improve)
    str(RtrM, max=2) # shows a bit more

    plot(RtrM) ## almost the same as
    plotRag(RtrM, subArgs=.optRagargs(adj = 0.5))
               ## which just gives " nodes with  edges"
  }

Run the code above in your browser using DataCamp Workspace