Learn R Programming

ttbary (version 0.3-0)

plotmatch: Plot Optimal Matching between Two Point Patterns

Description

After calling ppdist with argument ret_matching = TRUE in a situation where it makes sense to assign to the points of the patterns \(\xi\) and \(\eta\) coordinates in \(R^2\), this function may be used to display the result graphically.

Usage

plotmatch(
  xi,
  eta,
  dmat,
  res,
  penalty,
  p = 1,
  cols = c(2, 4),
  pchs = c(1, 1),
  cexs = c(1, 1),
  ...
)

Value

Used for the side effect of plotting.

Arguments

xi, eta

objects of class ppp.

dmat

a matrix specifying in its \((i,j)\)-th entry the distance from the i-th point of \(\xi\) to the j-th point of \(\eta\).

res

the object returned by the call to ppdist with ret_matching = TRUE.

penalty

a positive number. The penalty for adding/deleting points.

p

a number \(>0\). The order of the TT- or RTT-distance computed.

cols, pchs, cexs

vectors of length 2 specifying the corresponding graphic parameters col, pch and cex for plotting the two point patterns.

...

further graphic parameters passed to the code that draws the line segments between the points.

Author

Dominic Schuhmacher schuhmacher@math.uni-goettingen.de

Details

The default use-case is to plot a matching obtained with ppdist. In that case dmat, penalty and p should be the same as in the call to ppdist. These objects are used to display additional information about the matching.

See Also

ppdist

Examples

Run this code
  # See examples for ppdist

Run the code above in your browser using DataLab