plot.spp {ads}R Documentation

Plot a Spatial Point Pattern object

Description

Plot a Spatial Point Pattern object returned by function spp.

Usage

## S3 method for class 'spp'
plot(x, main, out=FALSE, use.marks=TRUE, cols, chars, cols.out, chars.out,
maxsize, scale=TRUE, add=FALSE, legend=TRUE, csize=1, ...)

Arguments

x

an object of class "spp" (see spp).

main

by default, the value of argument x, otherwise a text to be displayed as a title of the plot.main=NULL displays no title.

out

by default out = FALSE. If TRUE points of the pattern located outside the sampling window are plotted.

use.marks

by default use.marks = TRUE. If FALSE different symbols are not used for each mark of multivariate or marked point patterns, so that they are plotted as univariate (see spp).

cols

(optional) the colour(s) used to plot points located inside the sampling window (see Details).

chars

(optional) plotting character(s) used to plot points located inside the sampling window (see Details).

cols.out

(optional) if out = TRUE, the colour(s) used to plot points located outside the sampling window (see Details).

chars.out

(optional) if out = TRUE, plotting character(s) used to plot points located outside the sampling window (see Details).

maxsize

(optional) maximum size of plotting symbols. By default maxsize is automatically adjusted to plot size.

csize

scaling factor for font size so that actual font size is par("cex")*csize. By default csize = 1.

scale

If scale = TRUE (the default) graduations giving plot size are displayed.

legend

If legend = TRUE (the default) a legend for plot symbols is displayed (multivariate and marked types only).

add

by default add = FALSE. If TRUE a new window is not created and just the points are plotted over the existing plot.

...

extra arguments that will be passed to the plotting functions plot.default, points and/or symbols.

Details

The sampling window x$window is plotted first, through a call to function plot.swin. Then the points themselves are plotted, in a fashion that depends on the type of spatial point pattern (see spp).

Arguments cols and cols.out (if out = TRUE) determine the colour(s) used to display the points located inside and outside the sampling window, respectively. Colours may be specified as codes or colour names (see par("col")). For univariate and marked point patterns, cols and cols.out are single character strings, while for multivariate point patterns they are character vectors of same length as levels(x$marks) and levels(x$marksout), respectively.

Arguments chars and chars.out (if out = TRUE) determine the symbol(s) used to display the points located inside and outside the sampling window, respectively. Symbols may be specified as codes or character strings (see par("pch")). For univariate point patterns, chars and chars.out are single character strings, while for multivariate point patterns they are character vectors of same length as levels(x$marks) and levels(x$marksout), respectively. For marked point patterns, chars and chars.out can only take the value "circles" or "squares".

Value

none.

Author(s)

Raphael.Pelissier@ird.fr

See Also

spp, swin, plot.swin.

Examples

  data(BPoirier)
  BP<-BPoirier
  
  ## Not run: a univariate point pattern in a rectangle sampling window
  plot(spp(BP$trees, win=BP$rect))
  
  ## Not run: a univariate point pattern in a circular sampling window
 plot(spp(BP$trees, win=c(55,45,45)), out=TRUE, scale=TRUE)
 
 ## Not run: a univariate point pattern in a complex sampling window
 ## Not run: (points outside the sampling window displayed in red colour)
 plot(spp(BP$trees, win=BP$rect, tri=BP$tri1), out=TRUE)
  
 ## Not run: a multivariate point pattern in a rectangle sampling window
 plot(spp(BP$trees, win=BP$rect, marks=BP$species))
 
 ## Not run: a multivariate point pattern in a circular sampling window
 ## Not run: (points inside/outside the sampling window displayed in blue colour/as red crosses)
 plot(spp(BP$trees, win=c(55,45,45), marks=BP$species), out=TRUE, cols=c("blue","blue","blue"), 
 chars.out=c("+","+","+"), cols.out=c("red","red","red"))
 
  ## Not run: a marked point pattern in a rectangle sampling window with circles in green colour
  plot(spp(BP$trees, win=BP$rect, marks=BP$dbh), cols="green")

  ## Not run: a marked point pattern in a circular sampling window
  ## Not run: (squares in red colour inside and circles in blue colour outside)
  plot(spp(BP$trees, win=c(55,45,45), marks=BP$dbh), out=TRUE, chars="squares", 
  cols="red", cols.out="blue")

[Package ads version 1.5-10 Index]