The function persp
is generic. This is the
method for spatial point patterns (objects of class "ppp"
).
The argument x
must be a point pattern with numeric marks,
or with a data frame of marks.
A perspective view will be plotted. The eye position is determined by
the arguments theta
and phi
passed to persp.default
.
First the horizontal plane is drawn in perspective view,
using a faint grid of lines to help suggest the perspective.
Next the observation window of x
is placed on the horizontal
plane and its edges are drawn in perspective view.
Finally for each data point in x
, a vertical spike is erected
at the spatial location of the data point, with height equal to the
mark value of the point.
If any mark values are negative, the corresponding spikes will
penetrate below the horizontal plane. They can be drawn in a different
colour by specifying neg.args
as shown in the examples.
Like all spatial plots in the spatstat family,
persp.ppp
does not independently rescale
the \(x\) and \(y\) coordinates. A long narrow window will be
represented as a long narrow window in the perspective view.
To override this and allow the coordinates to be independently
rescaled, use the argument scale=TRUE
which will be passed
to persp.default
.