plot.dist.matrix | R Documentation |
Visualization of a DSM distance matrix as a neighbourhood graph based on multidimensional scaling (MDS).
## S3 method for class 'dist.matrix' plot(x, y, labels=rownames(x), show.labels=TRUE, label.pos=3, selected=attr(x, "selected"), show.selected=TRUE, col="black", cex=1, pch=20, pt.cex=1.2, selected.cex=1.2, selected.col="red", show.edges=TRUE, edges.lwd=6, edges.col="#AABBFF", edges.threshold=quantile(x, 2/3), method=c("isomds", "sammon"), aspect=1, expand=.05, ...)
x |
a symmetric distance matrix of class |
y |
unused, must not be specified |
labels |
a character vector of labels for the DSM vectors (defaults to rownames of |
show.labels |
if |
label.pos |
position of labels (default: above points). Possible values are |
selected |
logical vector of selected points that will be highlighted (defaults to optional |
show.selected |
if |
col |
colour of points and labels |
cex |
numeric character expansion factor for points and labels |
pch |
plot symbol for points |
pt.cex |
character expansion factor for points relative to labels |
selected.cex |
additional character expansion factor for selected points and labels |
selected.col |
colour of selected points and labels (if |
show.edges |
if |
edges.lwd |
maximal line width of edges (for d = 0) |
edges.col |
colour of edges, usually a light or translucent shade |
edges.threshold |
maximal distance up to which edges are drawn. The default is to display two thirds of all edges. |
method |
whether to perform non-metric ( |
aspect |
aspect ratio of plot window (e.g. |
expand |
fraction by which plotting region is extended on each side. Adjust this parameter so that points and labels are completely visible. |
... |
all other arguments are passed to the initial plot function, which sets up the display but does not draw any graphical elements |
For multidimensional scaling (MDS), the functions isoMDS
and sammon
from the MASS package are used.
Invisibly returns a two-column matrix with MDS coordinates of all displayed points and labels
as rownames (if available).
Stephanie Evert (https://purl.org/stephanie.evert)
nearest.neighbours
, which produces distance matrices suitable for plotting if the option dist.matrix=TRUE
is specified
## Not run: plot(nearest.neighbours(DSM_Vectors, "walk_V", n=20, dist.matrix=TRUE)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.