% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfkc.consensus.R
\name{plot.nmfkc.consensus}
\alias{plot.nmfkc.consensus}
\title{Plot a consensus rank-selection (nmfkc.consensus) object}
\usage{
\method{plot}{nmfkc.consensus}(
  x,
  type = c("criteria", "heatmap"),
  rank = NULL,
  mfrow = NULL,
  mar = NULL,
  col = grDevices::hcl.colors(50, "Blue-Red"),
  main = NULL,
  ...
)
}
\arguments{
\item{x}{An object of class \code{"nmfkc.consensus"}.}

\item{type}{\code{"criteria"} or \code{"heatmap"}.}

\item{rank}{For \code{type = "heatmap"}, the rank(s) to display.
\code{NULL} (default) shows every rank stored in \code{x}.}

\item{mfrow}{Panel layout for multiple heatmaps, as
\code{c(nrow, ncol)}.  \code{NULL} (default) uses
\code{\link[grDevices]{n2mfrow}} for a near-square grid.}

\item{mar}{Per-panel margins \code{c(b, l, t, r)} for the heatmap
view.  \code{NULL} (default) uses tight margins for a grid and wider
margins (for sample labels) when a single rank is shown.}

\item{col}{Heatmap colour palette (length-50 blue-to-red by default).}

\item{main}{Plot title for the \code{"criteria"} view (heatmap panels
are titled per rank).}

\item{...}{Further arguments passed to the underlying
\code{\link[graphics]{plot}} / \code{\link[graphics]{image}}.}
}
\value{
\code{x}, invisibly.
}
\description{
Two views of a \code{\link{nmfkc.consensus}} result:
\itemize{
\item \code{type = "criteria"} (default): the stability curves
\code{cophenetic} (blue) and \code{dispersion} (red) against rank.
No "best" marker is drawn -- a stable rank tends to be a coarse one,
so the curves are shown for inspection rather than as an optimum.
\item \code{type = "heatmap"}: the consensus matrix of each requested
\code{rank}, reordered by average-linkage hierarchical clustering of
\eqn{1 - \bar C} (blue = 0 / different cluster, red = 1 / same
cluster).  Requires \code{keep.consensus = TRUE} at compute time.
}
}
\seealso{
\code{\link{nmfkc.consensus}}
}
