Description Usage Arguments Author(s) See Also Examples
Create a 3d plot and 2d image or contour plots of the density of a mixture of normal components.
For examples see
http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#plot.normmix
1 2 3 4 |
x |
Object of class |
xlim, ylim |
The observation window. |
contour |
Logical flag requesting the countour plot only. |
truncate |
Logical flag requesting that the components are truncated within the window. |
open_new_window |
Open a new window for the plot. |
grayscale |
Plot in gray scale. Default is FALSE (use colors). |
L |
Length of the side of the square grid. The intensity is calculated on an L * L grid. The larger this value is, the better the picture resolution. |
title1 |
Optional title for the 3d plot. |
whichplots |
Requests plots of the normal mixture density (surface). To get only the 2d plot
set |
... |
Additional arguments for the S3 method. |
Jiaxun Chen, Sakis Micheas, Yuchen Wang
normmix
,
to_int_surf
,
owin
,
rsppmix
1 2 3 4 5 6 7 8 9 10 11 12 13 | # plot normmix density
truemix<- rnormmix(m = 3, sig0 = .1, df = 5, xlim= c(-1, 2), ylim = c(-1, 2))
summary(truemix)
#plot the normal mixture
plot(truemix, xlim= c(-1, 2), ylim = c(-1,2),
title1="True mixture density in 3d")+add_title(
"True mixture of normals density")
plot(truemix,xlim= c(-1, 2), ylim = c(-1, 2),contour = TRUE)+add_title(
"Contour plot of the true mixture of normals density")
#build a mixture intensity surface for the Poisson point process
trueintsurf=to_int_surf(truemix, lambda = 100, win=
spatstat::owin( c(-1, 2),c(-1, 2)))
plot(trueintsurf)#plot the surface, it is lambda*normmix
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.