Learn R Programming

tgp (version 1.1-11)

mapT: Plot the MAP partition, or add one to an existing plot

Description

Plot the maximum a' posteriori (MAP) tree from a "tgp"-class object, or add one on top of an existing plot. Like plot.tgp, projections and slices of trees can be plotted as specified

Usage

mapT(out, proj = NULL, slice = NULL, add = FALSE, lwd = 2, ...)

Arguments

out
"tgp"-class object which is the output of one the model functions with tree support (e.g. btgpllm)
proj
1-or-2-Vector describing the dimensions to be shown in a projection. The argument is ignored for 1-d data, i.e., if x$d == 1. For 2-d data, no projection needs be specified--- the default argument (proj = NULL) will
slice
list object with x and z fields, which are vectors of equal length describing the slice to be plotted, i.e., which z-values of the x$d - 2 inputs x$X and x$XX should
add
Specify whether the to add partitions to an existing plot (add = TRUE) or to make a new plot showing the data out$X along with the partitions (default add = FALSE)
lwd
Plotting argument specifying the width of the lines used to depict the partitions
...
Additional arguments to plot used when add = FALSE

Value

  • The only output of this function is a beautiful region-representation of the MAP tree.

References

http://www.ams.ucsc.edu/~rbgramacy/tgp.html

See Also

plot.tgp, tgp.trees, tgp.design, vignette("tgp")