Learn R Programming

spatstat.explore (version 3.1-0)

plot.fasp: Plot a Function Array

Description

Plots an array of summary functions, usually associated with a point pattern, stored in an object of class "fasp". A method for plot.

Usage

# S3 method for fasp
plot(x,formule=NULL, ...,
                        subset=NULL, title=NULL, banner=TRUE,
                        transpose=FALSE,
                        samex=FALSE, samey=FALSE,
                        mar.panel=NULL,
                        outerlabels=TRUE, cex.outerlabels=1.25,
                        legend=FALSE)

Value

None.

Arguments

x

An object of class "fasp" representing a function array.

formule

A formula or list of formulae indicating what variables are to be plotted against what variable. Each formula is either an R language formula object, or a string that can be parsed as a formula. If formule is a list, its \(k^{th}\) component should be applicable to the \((i,j)^{th}\) plot where x$which[i,j]=k. If the formula is left as NULL, then plot.fasp attempts to use the component default.formula of x. If that component is NULL as well, it gives up.

...

Arguments passed to plot.fv to control the individual plot panels.

subset

A logical vector, or a vector of indices, or an expression or a character string, or a list of such, indicating a subset of the data to be included in each plot. If subset is a list, its \(k^{th}\) component should be applicable to the \((i,j)^{th}\) plot where x$which[i,j]=k.

title

Overall title for the plot.

banner

Logical. If TRUE, the overall title is plotted. If FALSE, the overall title is not plotted and no space is allocated for it.

transpose

Logical. If TRUE, rows and columns will be exchanged.

samex,samey

Logical values indicating whether all individual plot panels should have the same x axis limits and the same y axis limits, respectively. This makes it easier to compare the plots.

mar.panel

Vector of length 4 giving the value of the graphics parameter mar controlling the size of plot margins for each individual plot panel. See par.

outerlabels

Logical. If TRUE, the row and column names of the array of functions are plotted in the margins of the array of plot panels. If FALSE, each individual plot panel is labelled by its row and column name.

cex.outerlabels

Character expansion factor for row and column labels of array.

legend

Logical flag determining whether to plot a legend in each panel.

Warnings

(Each component of) the subset argument may be a logical vector (of the same length as the vectors of data which are extracted from x), or a vector of indices, or an expression such as expression(r<=0.2), or a text string, such as "r<=0.2".

Attempting a syntax such as subset = r<=0.2 (without wrapping r<=0.2 either in quote marks or in expression()) will cause this function to fall over.

Variables referred to in any formula must exist in the data frames stored in x. What the names of these variables are will of course depend upon the nature of x.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner r.turner@auckland.ac.nz

Details

An object of class "fasp" represents an array of summary functions, usually associated with a point pattern. See fasp.object for details. Such an object is created, for example, by alltypes.

The function plot.fasp is a method for plot. It calls plot.fv to plot the individual panels.

For information about the interpretation of the arguments formule and subset, see plot.fv.

Arguments that are often passed through ... include col to control the colours of the different lines in a panel, and lty and lwd to control the line type and line width of the different lines in a panel. The argument shade can also be used to display confidence intervals or significance bands as filled grey shading. See plot.fv.

The argument title, if present, will determine the overall title of the plot. If it is absent, it defaults to x$title. Titles for the individual plot panels will be taken from x$titles.

See Also

alltypes, plot.fv, fasp.object

Examples

Run this code
   if(interactive()) {
   X.G <- alltypes(amacrine,"G")
   plot(X.G)
   plot(X.G,subset="r<=0.2")
   plot(X.G,formule=asin(sqrt(cbind(km,theo))) ~ asin(sqrt(theo)))
   plot(X.G,fo=cbind(km,theo) - theo~r, subset="theo<=0.9")
   }

Run the code above in your browser using DataLab