\inputencoding{latin1}
\HeaderA{arrayPlot}{Spatial image of microarray spots statistic}{arrayPlot}
\methaliasA{arrayPlot.arrayCGH}{arrayPlot}{arrayPlot.arrayCGH}
\methaliasA{arrayPlot.default}{arrayPlot}{arrayPlot.default}
\keyword{hplot}{arrayPlot}
\begin{Description}\relax
The function \code{arrayPlot} creates spatial images of shades of gray or colors that correspond to the values of a statistic for each spot on the array. The statistic can be the intensity log-ratio, a spot quality measure (e.g. spot size or shape), or a test statistic. This function can be used to explore whether there are any spatial effects in the data, for example, print-tip or cover-slip effects.
\end{Description}
\begin{Usage}
\begin{verbatim}
## Default S3 method:
arrayPlot(Statistic, Col, Row,
                  ArrCol, ArrRow, SpotCol, SpotRow,
                  mediancenter=FALSE,
                  col=myPalette("green", "red", "yellow"),
                  contour=FALSE, nlevels=5,
                  zlim=NULL, bar=c("none", "horizontal", "vertical"),
                  layout=TRUE, ...) 

## S3 method for class 'arrayCGH':
arrayPlot(arrayCGH, variable,
                   mediancenter=FALSE,
                   col=myPalette("green", "red", "yellow"),
                   contour=FALSE, nlevels=5,
                   zlim=NULL, bar=c("none", "horizontal", "vertical"),
                   layout=TRUE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{arrayCGH}] Object of class \code{\LinkA{arrayCGH}{arrayCGH}}.
\item[\code{variable}] Variable to be plotted
\item[\code{Statistic}] Statistic to be plotted.
\item[\code{Col}] Vector of columns coordinates.
\item[\code{Row}] Vector of rows coordinates.
\item[\code{ArrCol}] Number of columns for the blocs.
\item[\code{ArrRow}] Number of rows for the blocs.
\item[\code{SpotCol}] Number of column for each bloc.
\item[\code{SpotRow}] Number of rows for each bloc.
\item[\code{mediancenter}] If \code{mediancenter=TRUE}, values of \code{Statistic} are median-centered.
\item[\code{col}] List of colors such as that generated by \code{\LinkA{Palettes}{Palettes}}. In addition to these color palettes functions, a new function \code{\LinkA{myPalette}{myPalette}} was defined to generate color palettes from user supplied low, middle, and high color values. 
\item[\code{contour}] If \code{contour=TRUE}, contour are plotted,
otherwise they are not shown.
\item[\code{nlevels}] Numbers of levels added by \code{\LinkA{contour}{contour}} if \code{contour=TRUE}.
\item[\code{zlim}] Numerical vector of length 2 giving the extreme values of
\code{z} to associate with colors \code{low} and \code{high} of
\code{\LinkA{myPalette}{myPalette}}. By default \code{zlim} is the range of
\code{z}.  Any values of \code{z} outside
the interval \code{zlim} will be truncated to the relevant limit.
\item[\code{bar}] If \code{bar=='horizontal'} (resp. \code{'vertical'}), an
horizontal (resp. vertical) calibration color bar is shown to the
right of the image.
\item[\code{layout}] If \code{layout==TRUE} plot layout is automatically set
when a color bar is asked for
\item[\code{...}] Graphical parameters can be given as arguments to function
\code{\LinkA{image}{image}}.
\end{ldescription}


N.B. : Col takes the values in 1:arrayRow*SpotRow and Row takes the
values in 1:arrayCol*SpotCol
\end{Arguments}
\begin{Details}\relax
This function is very similar to the
\code{\LinkA{maImage}{maImage}} written by Sandrine Dudoit with
added options \code{zlim}, \code{mediancenter} and \code{layout}.
\end{Details}
\begin{Value}
An image is created on the current graphics device.
\end{Value}
\begin{Note}\relax
People interested in tools dealing with array CGH analysis can
visit our web-page \url{http://bioinfo.curie.fr}.
\end{Note}
\begin{Author}\relax
Philippe Hupé, \email{glad@curie.fr}.
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{image}{image}}, \code{\LinkA{contour}{contour}}, \code{\LinkA{arrayPersp}{arrayPersp}}, \code{\LinkA{myPalette}{myPalette}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(arrayCGH)

pdf(file="arrayCGH.pdf",height=21/cm(1),width=29.7/cm(1))
arrayPlot(array2$Log2Rat, array2$Col, array2$Row, 4,4,21,22, main="Spatial Image of array CGH")
dev.off()

# object of class arrayCGH

array <- list(arrayValues=array2, arrayDesign=c(4,4,21,22))
class(array) <- "arrayCGH"

arrayPlot(array,"Log2Rat", main="Spatial Image of array CGH")

\end{ExampleCode}
\end{Examples}

