Description Usage Arguments Author(s) See Also Examples
View source: R/normmix_plots.R
Plot a spatial point pattern generated from a Poisson with
mixture intensity surface. Alternatively, the function can
plot a spatstat ppp
object.
For examples see
http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#plot.sppmix
1 2 3 |
x |
A point pattern of class |
mus |
An optional list of the theoretical means of the mixture components. |
estcomp |
The estimated component label should be a vector whose length
should be the same as number of points. If |
open_new_window |
Open a new window for the plot. |
colors |
Logical flag requesting to use different colors for the points based on which component they belong to. |
showmarks |
Logical flag requesting to plot each point with a different circle size according to its mark value. If the mark is a data.frame object (multivariate marks), the first column (mark) is used as the the marks and displayed. |
whichmark |
If multivariate marks, choose to display this one. |
... |
Additional parameters to the |
Jiaxun Chen, Sakis Micheas, Yuchen Wang
normmix
,
to_int_surf
,
owin
,
rsppmix
,
est_mix_damcmc
,
GetMAPLabels
,
rMIPPP_cond_mark
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | mix1 <- rnormmix(5, sig0 = .01, df = 5, xlim=c(0, 5), ylim=c(0, 5))
intsurf1=to_int_surf(mix1, lambda = 40, win =spatstat::owin( c(0, 5),c(0, 5)))
pp1 <- rsppmix(intsurf1)
plot(pp1)
plot(pp1, mus=intsurf1$mus)
plot(pp1,mus=intsurf1$mus)+add_title(
"Poisson point pattern along with the true component means", m=intsurf1$m,n=pp1$n)
plot(pp1, mus = intsurf1$mus, lambda = intsurf1$lambda)
plot(pp1, mus = intsurf1$mus)+ add_title(
"Poisson point pattern along with the true component means", lambda = intsurf1$lambda,
m=intsurf1$m,n=pp1$n)
#use the demo intensity surface
demo_intsurf
pp2 <- rsppmix(demo_intsurf,marks = 1:3)
plot(pp2)
plot(pp2, mus = demo_intsurf$mus)#plot the mixture means as well
#plot the points with different colors depending on the true component label
plot(pp2, colors = TRUE)
#plot the points with different colors depending on the estimated component label
fit <- est_mix_damcmc(pp2, 2)
est_comp <- GetMAPLabels(fit)
plot(pp2, estcomp = est_comp, colors = TRUE)
#generate and plot a marked point pattern
newMPP=rMIPPP_cond_mark()
plot(newMPP$genMPP, showmarks=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.