% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manuscript-viz.R
\name{embedding_plot}
\alias{embedding_plot}
\title{Two-dimensional cluster visualisation (PCA / UMAP / t-SNE)}
\usage{
embedding_plot(
  x,
  labels,
  method = c("pca", "umap", "tsne"),
  col = NULL,
  main = NULL
)
}
\arguments{
\item{x}{A fitted result (\code{$DistM}), a dissimilarity, or a \code{List}.}

\item{labels}{Cluster label of each object.}

\item{method}{\code{"pca"} (default), \code{"umap"} or \code{"tsne"}.}

\item{col}{Optional cluster colours.}

\item{main}{Plot title.}
}
\value{
Invisibly the 2-column coordinate matrix.
}
\description{
Project the objects to two dimensions and colour them by cluster. \code{"pca"}
uses classical MDS of the fused dissimilarity (always available); \code{"umap"}
needs \pkg{uwot} and \code{"tsne"} needs \pkg{Rtsne}.
}
\examples{
data(mosaic_toy)
fit <- M_ABCpp(mosaic_toy$List, numsim = 40, NC = 3)
embedding_plot(fit, mosaic_labels(fit, 3), method = "pca")
}
\seealso{
\code{\link{cluster_selection_plot}}
}
