Plot a List of Point Patterns

Plots a list of point patterns.

hplot, spatial
## S3 method for class 'splitppp':
plot(x, \dots, main, arrange=TRUE,
   nrows=NULL, ncols=NULL,
   main.panel=NULL, mar.panel=c(2,1,1,2),
   panel.begin=NULL, panel.end=NULL, panel.args=NULL, plotcommand="plot",
   adorn.left=NULL, adorn.right=NULL,, adorn.bottom=NULL,
A named list of point patterns, typically obtained from split.ppp.
Arguments passed to plot.ppp which control the appearance of each plot panel.
Overall heading for the plot.
Logical flag indicating whether to plot the point patterns side-by-side on a single page (arrange=TRUE) or plot them individually in a succession of frames (arrange=FALSE).
Optional. The number of rows/columns in the plot layout (assuming arrange=TRUE). You can specify either or both of these numbers.
Optional. A character string, or a vector of character strings, giving the headings for each of the point patterns.
Optional value of the graphics parameter mar controlling the size of the margins outside each plot panel. See the help file for par.
Optional. Functions that will be executed before and after each panel is plotted. See Details.
Internal use only.
Optional. Character string containing the name of the command that should be executed to plot each panel.
Optional. Functions (with no arguments) that will be executed to generate additional plots at the margins (left, right, top and/or bottom, respectively) of the array of plots.
Relative width (as a fraction of the other panels' widths) of the margin plots.
Logical value indicating whether the components should be plotted at (approximately) the same physical scale.

This is the plot method for the class "splitppp". It is typically used to plot the result of the function split.ppp but it may also be used to plot any list of point patterns created by the user.

The argument x should be a named list of point patterns (objects of class "ppp", see ppp.object). Each of these point patterns will be plotted in turn using plot.ppp.

The arguments panel.begin and panel.end may be functions that will be executed before and after each panel is plotted. They will be called as panel.begin(i, y, main=main.panel[i]) and panel.end(i, y, add=TRUE).

Alternatively, panel.begin and panel.end may be objects of some class that can be plotted with the generic plot command. They will be plotted before and after each panel is plotted.

If equal.scales=FALSE (the default), then the plot panels will have equal height on the plot device (unless there is only one column of panels, in which case they will have equal width on the plot device). This means that the objects are plotted at different physical scales, by default.

If equal.scales=TRUE, then the dimensions of the plot panels on the plot device will be proportional to the spatial dimensions of the corresponding components of x. This means that the objects will be plotted at approximately equal physical scales. If these objects have very different spatial sizes, the plot command could fail (when it tries to plot the smaller objects at a tiny scale), with an error message that the figure margins are too large.

The objects will be plotted at exactly equal physical scales, and exactly aligned on the device, under the following conditions:

  • every component ofxis a spatial object whose position can be shifted byshift;
  • panel.beginandpanel.endare eitherNULLor they are spatial objects whose position can be shifted byshift;
  • adorn.left,adorn.right,adorn.topandadorn.bottomare allNULL.


  • Null.

Error messages

If the error message Figure margins too large occurs, ensure that equal.scales=FALSE and increase the values of mar.panel.

See Also

split.ppp, plot.ppp, ppp.object, plot.listof,

  • plot.splitppp
# Multitype point pattern
 plot(split(amacrine), main="", 
     panel.begin=function(i, y, ...) { plot(density(y), ribbon=FALSE, ...) })
Documentation reproduced from package spatstat, version 1.36-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.