| plot.fasp {spatstat} | R Documentation |
Plots an array of summary functions, usually associated with a
point pattern, stored in an object of class "fasp".
A method for plot.
plot(x) plot(x, formula=formula) plot(x, formula=formula, subset)
x |
An object of class "fasp" representing a
function array.
|
formula |
A formula or list of formulae indicating what
variables are to be plotted against what variable. If
formula 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.
In S-PLUS, if this argument is given, then either it must be supplied in the ``name=value'' format, or the name of the plotting function must be used explicitly. I.e. the call must use the function name plot.fasp
and not plot. Otherwise the plotting function
falls over. See Warnings. There is no problem in R.
|
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.
|
lty |
A vector of integers indicating line types to be used in forming the plot. |
col |
A vector of integers indicating colours for the different lines which form the plot. |
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 might be created, for example, by alltypes
or allstats.
The function plot.fasp is
a method for plot. It calls conspire to do the
actual plotting.
For information about the interpretation of the
arguments formula, subset, lty and col,
see conspire.
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.
None.
The new classes and methods of S version 4 have not been
used here. Hence, this function falls over in some versions of S-PLUS
if a formula is given explicitly
as an argument, unless either this argument is presented in the
``name=value'' format, or this function is called explicitly
as plot.fasp and not as plot. There is no
problem in R.
(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.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
alltypes,
allstats,
conspire,
fasp.object
library(spatstat)
# Bramble Canes data.
data(bramblecanes)
X.G <- alltypes(bramblecanes,type="G",dataname="Bramblecanes",verb=T)
plot(X.G)
plot(X.G,subset="r<=0.2")
plot(X.G,formula=cbind(asin(sqrt(km)),
asin(sqrt(theo))) ~ asin(sqrt(theo)))
plot(X.G,fo=cbind(km-theo,0)~r,"r<=0.2")
# Swedish pines.
data(swedishpines)
X <- allstats(swedishpines,dataname="Swedish Pines")
plot(X,subset=list("r<=20","r<=20","r<=20","r<=50"))
# Simulated data.
pp <- runifpoint(350, owin(c(0,1),c(0,1)))
pp$marks <- factor(c(rep(1,50),rep(2,100),rep(3,200)))
X.K <- alltypes(pp,type="K",verb=T,dataname="Fake Data")
plot(X.K,fo=cbind(border,theo)~theo,"theo<=0.75")