plot.density: Plot density estimate or histogram of a scalar variable

Description Usage Arguments Details See Also


This function plots a smoothed kernel density estimate for a scalar variable if it is continuous or a histogram if it is discrete.


plotDensity(node, plot=TRUE, main = NULL, xlab = "" , ylab = "", col = "red",



Character, name of a scalar variable in the model.


Logical, whether to plot the trace or only return density estimates. If TRUE, density estimates are returned invisibly.

main, xlab, ylab, col

graphical parameters, see plot.default


Further graphical parameters as in par.


Acts on a scalar variable. See the wrapper function samplesDensity for more details.

See Also

samplesDensity, BRugs, help.WinBUGS

BRugs documentation built on May 19, 2017, 6:19 p.m.

Search within the BRugs package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.