\Header{plot.imageMatrix}{Visualisation of a matrix}
\keyword{hplot}{plot.imageMatrix}
\begin{Description}\relax
Visualisation of a data matrix, e.g. a matrix representing
a two dimensional area, a matrix of distance or similarity scores,
or any numeric matrix. Coloured boxes represent values, labels will
be drawn inside the box.
\end{Description}
\begin{Usage}
\begin{verbatim}plot.imageMatrix(x, labelMatrix, zlim, separateZScale=FALSE, zScale=TRUE, colourRamp, reverseYaxis = TRUE, labels, xLabels, yLabels, width=8, height=7, labelMatrixTextScaling=0.7, plotOutput="standard", fileName, ...)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] data matrix, class \code{matrix}; required; default missing
\item[\code{labelMatrix}] matrix of labels of class \code{array} of dim(\code{x});
optional; default missing
\item[\code{zlim}] numeric vector; defines the maximal z-range of the plot;
default missing
\item[\code{zScale}] logical; adds a scale to the plot; required; default TRUE
\item[\code{separateZScale}] logical; extra plot of the scale; required; default FALSE
\item[\code{colourRamp}] vector of colours; optional; default missing
\item[\code{reverseYaxis}] logical; required; default \code{TRUE}
\item[\code{labels}] vector of names corresponding to  a quadratic \code{x};
optional; default missing
\item[\code{xLabels}] vector of names corresponding to the columns of
\code{x} overrides \code{labels}; optional; default missing
\item[\code{yLabels}] vector of names corresponding to the rows of
\code{x} overrides \code{labels}; optional; default missing
\item[\code{width}] graphics window width; required; default: 8
\item[\code{height}] graphics window height; required; default: 7
\item[\code{labelMatrixTextScaling}] numeric; required; default: 0.7
\item[\code{plotOutput}] character string specifying
either "standard", "screen", "twoScreens", "pdf" or "win.metafile";
required; default: "standard"
\item[\code{fileName}] character string specifying the file path and file name;
optional; default missing
\item[\code{...}] arguments are passed to \code{image}(), for example
\code{xlab}, \code{ylab} (x- and y-axis label) and
\code{main} (plot title)
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If no labels are supplied, the dimnames of \code{x} or if missing
a simple numbering is used instead.
\end{Details}
\begin{Author}\relax
Andreas Buness <a.buness@dkfz.de>
\end{Author}
\begin{Examples}
\begin{ExampleCode}

 plot.imageMatrix(x=matrix(c(3,4,4,3),nrow=2, ncol=2),labels=c("one","two"))
 ma <- matrix(c(0.3,0.01,0.7,0.1,0.5,0.3,1,0.5,01), nrow=3,ncol=3)
 class(ma) <- c("imageMatrix", "matrix")
 plot(ma, labelMatrix=ma,labels=c("one","two", "three"), zlim=c(0,1))
 ma <- matrix(c(0.3, 0.01, 0.7, 0.1, 0.5, 0.3, 1, 0.5, 1, 0, 1, 0), nrow = 4, ncol = 3, byrow=TRUE )
 class(ma) <- c("imageMatrix", "matrix")
 plot(ma, labelMatrix = ma, xLabels = c("one", "two", "three"), zlim=c(0,1))
 plot(ma, reverseYaxis=FALSE, labelMatrix = ma, xLabels = c("one", "two", "three"), zlim=c(0,1))



 \end{ExampleCode}
\end{Examples}

