Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.msr

Plot a Signed or Vector-Valued Measure


Description

Plot a signed measure or vector-valued measure.

Usage

## S3 method for class 'msr'
plot(x, ...,
                     add = FALSE,
                     how = c("image", "contour", "imagecontour"),
                     main = NULL,
                     do.plot = TRUE,
                     multiplot = TRUE,
                     massthresh = 0,
                     equal.markscale = FALSE,
                     equal.ribbon = FALSE)

Arguments

x

The signed or vector measure to be plotted. An object of class "msr" (see msr).

...

Extra arguments passed to Smooth.ppp to control the interpolation of the continuous density component of x, or passed to plot.im or plot.ppp to control the appearance of the plot.

add

Logical flag; if TRUE, the graphics are added to the existing plot. If FALSE (the default) a new plot is initialised.

how

String indicating how to display the continuous density component.

main

String. Main title for the plot.

do.plot

Logical value determining whether to actually perform the plotting.

multiplot

Logical value indicating whether it is permissible to display a plot with multiple panels (representing different components of a vector-valued measure, or different types of points in a multitype measure.)

massthresh

Threshold for plotting atoms. A single numeric value or NULL. If massthresh=0 (the default) then only atoms with nonzero mass will be plotted. If massthresh > 0 then only atoms whose absolute mass exceeds massthresh will be plotted. If massthresh=NULL, then all atoms of the measure will be plotted.

equal.markscale

Logical value indicating whether different panels should use the same symbol map (to represent the masses of atoms of the measure).

equal.ribbon

Logical value indicating whether different panels should use the same colour map (to represent the density values in the diffuse component of the measure).

Details

This is the plot method for the class "msr".

The continuous density component of x is interpolated from the existing data by Smooth.ppp, and then displayed as a colour image by plot.im.

The discrete atomic component of x is then superimposed on this image by plotting the atoms as circles (for positive mass) or squares (for negative mass) by plot.ppp. By default, atoms with zero mass are not plotted at all.

To smooth both the discrete and continuous components, use Smooth.msr.

Use the argument clipwin to restrict the plot to a subset of the full data.

To remove atoms with tiny masses, use the argument massthresh.

Value

(Invisible) colour map (object of class "colourmap") for the colour image.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

X <- rpoispp(function(x,y) { exp(3+3*x) })
   fit <- ppm(X, ~x+y)
   rp <- residuals(fit, type="pearson")
   rs <- residuals(fit, type="score")

   plot(rp)
   plot(rs)
   plot(rs, how="contour")

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.