plot.minDC {analogue}R Documentation

Plot of minimum dissimilarity per sample


Minimum dissimilarity is a useful indicator of reliability of reconstructions performed via MAT and other methods, and for analogue matching. Minimum dissimilarity for a sample is the smallest dissimilarity between it and the training set samples.


## S3 method for class 'minDC'
plot(x, depths, use.labels = FALSE,
           quantiles = TRUE, rev.x = TRUE, type = "l",
           xlim, ylim, xlab = "", ylab = "Dissimilarity",
           main = "", sub = NULL,
           col.quantile = "red", lty.quantile = "dotted",



an object of class "minDC".


numeric; a vector of depths for which predicted values exist or will be generated. Can be missing, in which case, if use.labels = TRUE, the function will attempt to derive suitable values for you. See Details below.


logical; should reconPlot attempt to derive values for argument depths from the names of the predicted values? Only use if depths is missing. See Details below.


logical; should the probability quantiles be drawn on the plot?


logical; should the depth/age axis be reversed (drawn from high to low)?


type of line drawn. See par and argument "type".

xlab, ylab

character; the x- and y-axis labels respectively.

main, sub

character; main title and subtitle for the plot.

xlim, ylim

numeric, length 2; the x- and y-limits for the plotted axes. If not provided, the function will calculate appropriate values to cover the range of plotted values and any quantile lines (if requested via "quantiles".


colour in which to draw the quantile lines.


line type in which to draw the quantile lines.


arguments to be passed to methods, such as graphical parameters (see par). Currently ignored.


Conventionally, these plots are drawn on a depth or an age scale. Argument depths is used to provide the depth or age axis, against which the predicted values are plotted.

If depths is not provided, then the function will try to derive the appropriate values from the labels of the predictions if use.labels = TRUE. You must provide depths or set use.labels = TRUE otherwise an error will result. The derived labels will be coerced to numerics. If your labels are coercible, then you'll either get nonsense on the plot or an error from R. If so, provide suitable values for depths.


A plot on the currently active device.


Gavin L. Simpson

See Also



## Imbrie and Kipp example
## load the example data

## merge training and test set on columns
dat <- join(ImbrieKipp, V12.122, verbose = TRUE)

## extract the merged data sets and convert to proportions
ImbrieKipp <- dat[[1]] / 100
V12.122 <- dat[[2]] / 100

## fit the MAT model using the chord distance measure
(ik.mat <- mat(ImbrieKipp, SumSST, method = "chord"))

## reconstruct for the RLGH core data
v12.mat <- predict(ik.mat, V12.122)

## extract the minimum DC values
v12.mdc <- minDC(v12.mat)

## draw a plot of minimum DC by time
plot(v12.mdc, use.labels = TRUE, xlab = "Depth (cm.)")

[Package analogue version 0.17-6 Index]