View source: R/Class-hier-fn.R
mRagraph | R Documentation |
My constructor of an Ragraph
object, a kind of “laid-out” graph, from package
Rgraphviz. This allows more customization in plotting than just
calling plot(gr, ...)
for a
graph
object from package
graph.
mRagraph(gr, lType, fixedsize = FALSE,
fill = c("lightblue", "gray90"),
color = c("blue3", "gray60"),
labcol = c("blue3", "green4", "purple"))
gr |
an R object of class |
lType |
a string specifying the layout type,
see |
fixedsize |
logical indicating if the ellipses should all get the same size – or should rather adapt to the situation. |
fill |
character vector of length 2.... |
color |
character vector of length 2.... |
labcol |
vector of labels to be used .... |
an object of class Ragraph
,
produced by an appropriate call to agopen
.
Martin Maechler
the customized plotting function plotRag
.
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)# 'graph' method -> using 'Rgraphviz' package
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.