plot.bnc_dag: Plot the structure.

View source: R/bnc-dag-operate.R

plot.bnc_dagR Documentation

Plot the structure.

Description

If node labels are to small to be viewed properly, you may fix label fontsize with argument fontsize. Also, you may try multiple different layouts.

Usage

## S3 method for class 'bnc_dag'
plot(x, y, layoutType = "dot", fontsize = NULL, ...)

Arguments

x

The bnc_dag object. The Bayesian network classifier structure.

y

Not used

layoutType

a character. Optional.

fontsize

integer Font size for node labels. Optional.

...

Not used.

Examples

 

# Requires the graph and Rgraphviz packages to be installed.
data(car)
nb <- nb('class', car)
nb <- nb('class', car)
## Not run: plot(nb)
## Not run: plot(nb, fontsize = 20)
## Not run: plot(nb, layoutType = 'circo')
## Not run: plot(nb, layoutType = 'fdp')
## Not run: plot(nb, layoutType = 'osage')
## Not run: plot(nb, layoutType = 'twopi')
## Not run: plot(nb, layoutType = 'neato')

bnclassify documentation built on Nov. 16, 2022, 5:08 p.m.