Description Usage Arguments Author(s) See Also Examples
When a normmix
object is given, this
function calculates the mixture density over
a fine grid for the given window. When an intensity_surface
object
is given, the function multiplies the density with
the surface lambda, and returns the Poisson
mixture intensity function over the grid. Used for plotting.
For examples see
http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#plotmix_3d
1 2 | plotmix_3d(dens_image, title1 = "3d Surface (Density or Intensity)",
zlims = NULL, grayscale = FALSE)
|
dens_image |
An image as an object of class |
title1 |
A title for the 3d plot. |
zlims |
The limits of the z axis. Defaults to [0,1.1*max(dens_image)]. |
grayscale |
Plot in gray scale. Default is FALSE (use colors). |
Jiaxun Chen, Sakis Micheas, Yuchen Wang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | truemix <- rnormmix(m = 5, sig0 = .1, df = 5, xlim= c(0, 3), ylim = c(0, 3))
normdens=dnormmix(truemix, xlim= c(0, 3), ylim = c(0, 3))
plotmix_3d(normdens)
plotmix_3d(normdens, title1="Density of a normal mixture")
#use the demo_mix and demo_truemix3comp objects; the windows are found in the
#corresponding demo demo_intsurf and demo_intsurf3comp
demo_intsurf$window
normdens1=dnormmix(demo_mix, xlim= c(0, 1), ylim = c(0, 1))
plotmix_3d(normdens1, title1="Density of a normal mixture, 2 components")
#change the window
normdens1=dnormmix(demo_mix, xlim= c(-1, 1.5), ylim = c(-1, 1.5))
plotmix_3d(normdens1, title1="Density of a normal mixture, 2 components")
demo_intsurf3comp$window
normdens2=dnormmix(demo_truemix3comp, xlim= c(-1, 1), ylim = c(-2, 3))
plotmix_3d(normdens2, title1="Density of a normal mixture, 3 components")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.