plotGmmOverlay

Description

Overlays a Gaussian mixture over an existing plot as output by plotGreyPatches.

Usage

1

Arguments

gmm

GMM object (see VBmix::newGmm for format definition)

Value

NULL

Author(s)

Pierrick Bruneau

See Also

plotGreyPatches

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
maingrey <- runif(20)
auxgrey <- runif(20)
xvals <- c(rnorm(20, -3), rnorm(20, 3))
yvals <- rnorm(40)

# set a gaussian mixture model 
gaussmod <- list()
gaussmod$w <- c(0.5, 0.5)
gaussmod$mean <- list(c(-3,0), c(3,0))
gaussmod$cov <- list(diag(2), diag(2))

# overlay the output of plotGreyPatches
plotGreyPatches(cbind(xvals, yvals), maingrey, auxgrey)
plotGmmOverlay(gaussmod)