\name{heatmapsM}
\alias{heatmapsM}

\title{
  Function to plot heatmaps separating groups generated by SOM or
  k-means
}

\description{
  This function display individual heatmaps for each group constructed
  by divisive clustering techniques, like SOM or k-means. It is possible
  to add hierarchical dendrograms to each group individually.
}

\usage{
heatmapsM(data, groups, sampleT=NULL, doHier=FALSE, distfun=dist,
          hclustfun=hclust, \dots)
}

\arguments{
  \item{data}{numeric matrix to be displayed, including all observations
    from all groups.}
  \item{groups}{numeric or character vector (with length equal to
    columns or rows of data) with identification of the groups to be
    separated. If numeric must contain the indexes and if character must
    contain the colnames or rownames.}
  \item{sampleT}{list with 2 vectors, the first one specifying the first
    character of each sample label to be coloured according to the colours
    specified in the second vector.}
  \item{doHier}{logical indicating to plot or not the hierarchical
    branch in the other dimension of the matrix.}
  \item{distfun}{the function to be used for distance calculation.}
  \item{hclustfun}{the function for to be used for hierarchical cluster
    calculation.}
  \item{\dots}{additional parameters for \code{\link[graphics]{image}} function.}
}

\details{
  This function is used internally by the functions
  \code{\link{hierM}}, \code{\link{somM}} and
  \code{\link{kmeansM}}. If you want to the hierarchical dendrogram in the
  other dimension, pay attention to the number of observations in this
  dimension, because the calculation of the hierarchical branch may be
  very time consuming! 
}

\value{
  This function display the heatmaps and don't return any object or value.
}

\seealso{
  \code{\link{hierM}}, \code{\link{somM}}, \code{\link{kmeansM}}
}

\author{
  Elier B. Cristo, addapted by Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
}

\keyword{hplot}