| Index | Topics |
| graphviz.plot {bnlearn} | R Documentation |
Advanced Bayesian network plots
Description
Plot the graph associated with a Bayesian network using the Rgraphviz package.
Usage
graphviz.plot(x, highlight = NULL, layout = "dot", shape = "circle", main = NULL, sub = NULL)
Arguments
x |
an object of class bn or bn.fit. |
highlight |
a list, see below. |
layout |
a character string, the layout parameter to be passed to Rgraphviz. Possible
values are dots, neato, twopi, circo and
fdp. See Rgraphviz documentation for details. |
shape |
a character string, the shape of the nodes. Can be either circle or
ellipse. |
main |
a character string, the main title of the graph. It's plotted at the top of the graph. |
sub |
a character string, a subtitle which is plotted at the bottom of the graph. |
Details
The highlight parameter is a list with at least one of the following elements:
nodes: a character vector, the labels of the nodes to be highlighted.arcs: the arcs to be highlighted (a two-column matrix, whose columns are labeledfromandto).
and optionally one or more of the following formatting parameters:
col: an integer or character string (the highlight colour). The default value isred.fill: an integer or character string (the colour used as a background colour for the nodes). The default value iswhite.lwd: a positive number (the line width of highlighted arcs). It overrides the line width settings instrength.plot. The default value is to use the global settings of Rgraphviz.lty: the line type of highlighted arcs. Possible values are 0, 1, 2, 3, 4, 5, 6, "blank", "solid", "dashed", "dotted", "dotdash", "longdash" and "twodash". The default value is to use the global settings of Rgraphviz.
Value
graphviz.plot returns invisibly the graph object produced by Rgraphviz.
Author(s)
Marco Scutari
See Also
| Index | Topics |
