Learn R Programming

bnclassify (version 0.4.8)

plot.bnc_dag: 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 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

Run this code
 

# Requires the igraph package to be installed.
data(car)
nb <- nb('class', car)
nb <- nb('class', car)
if (FALSE) plot(nb)
if (FALSE) plot(nb, fontsize = 20)
if (FALSE) plot(nb, layoutType = 'circo')
if (FALSE) plot(nb, layoutType = 'fdp')
if (FALSE) plot(nb, layoutType = 'osage')
if (FALSE) plot(nb, layoutType = 'twopi')
if (FALSE) plot(nb, layoutType = 'neato')

Run the code above in your browser using DataLab