\HeaderA{plot}{Scatter-plots for cDNA microarray spot statistics}{plot}
\aliasA{addLines}{plot}{addLines}
\aliasA{addPoints}{plot}{addPoints}
\aliasA{addText}{plot}{addText}
\aliasA{lines,marrayNorm-method}{plot}{lines,marrayNorm.Rdash.method}
\aliasA{lines,marrayRaw-method}{plot}{lines,marrayRaw.Rdash.method}
\aliasA{plot.marrayNorm}{plot}{plot.marrayNorm}
\aliasA{plot.marrayRaw}{plot}{plot.marrayRaw}
\aliasA{points,marrayNorm-method}{plot}{points,marrayNorm.Rdash.method}
\aliasA{points,marrayRaw-method}{plot}{points,marrayRaw.Rdash.method}
\aliasA{text,marrayNorm-method}{plot}{text,marrayNorm.Rdash.method}
\aliasA{text,marrayRaw-method}{plot}{text,marrayRaw.Rdash.method}
\keyword{hplot}{plot}
\begin{Description}\relax
The function \code{maPlot} or \code{plot} produces scatter-plots of
microarray spot statistics for the classes \code{"\LinkA{marrayRaw}{marrayRaw}"},
\code{"\LinkA{marrayNorm}{marrayNorm}"}. It also allows the user to highlight and
annotate subsets of points on the plot, and display fitted curves from
robust local regression or other smoothing procedures.
\end{Description}
\begin{Usage}
\begin{verbatim}
plot.marrayRaw(x, xvar = "maA", yvar = "maM", zvar="maPrintTip", lines.func,text.func,legend.func,...)
plot.marrayNorm(x, xvar = "maA", yvar = "maM", zvar="maPrintTip", lines.func,text.func,legend.func,...)
addText(object, xvar="maA", yvar="maM", subset=NULL, labels=as.character(1:length(subset)), ...)
addPoints(object, xvar="maA", yvar="maM", subset=TRUE, ...)
addLines(object, xvar="maA", yvar="maM", zvar="maPrintTip", subset=TRUE, ...)
## S4 method for signature 'marrayRaw':
text(x, xvar = "maA", yvar = "maM", ...)
## S4 method for signature 'marrayNorm':
text(x, xvar = "maA", yvar = "maM", ...)
## S4 method for signature 'marrayRaw':
lines(x, xvar = "maA", yvar = "maM", ...)
## S4 method for signature 'marrayNorm':
lines(x, xvar = "maA", yvar = "maM", ...)
## S4 method for signature 'marrayRaw':
points(x, xvar = "maA", yvar = "maM", ...)
## S4 method for signature 'marrayNorm':
points(x, xvar = "maA", yvar = "maM", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] Microarray object of class \code{"\LinkA{marrayRaw}{marrayRaw}"}, \code{"\LinkA{marrayNorm}{marrayNorm}"}.
\item[\code{object}] Microarray object of class \code{"\LinkA{marrayRaw}{marrayRaw}"}, \code{"\LinkA{marrayNorm}{marrayNorm}"}.
\item[\code{xvar}] Name of accessor function for the abscissa spot statistic, typically a slot name for the microarray object \code{x}, such as \code{maA}.
\item[\code{yvar}] Name of accessor function for the ordinate spot statistic, typically a slot name for the microarray object \code{x}, such as \code{maM}.
\item[\code{zvar}] Name of accessor method for the spot statistic used to stratify the data, typically a slot name for the microarray layout object (see \code{"\LinkA{marrayLayout}{marrayLayout}"}) such as \code{maPlate} or a method such as \code{maPrintTip}. If \code{zvar} is NULL, the data are not stratified.
\item[\code{lines.func}] Function for computing and plotting smoothed fits of \code{y} as a function of \code{x}, separately within values of \code{zvar}, e.g. \code{\LinkA{maLoessLines}{maLoessLines}}. If \code{lines.func} is NULL, no fitting is performed.
\item[\code{text.func}] Function for highlighting a subset of points, e.g., \code{\LinkA{maText}{maText}}. If \code{text.func} is NULL, no points are highlighted.
\item[\code{legend.func}] Function for adding a legend to the plot,  e.g. \code{\LinkA{maLegendLines}{maLegendLines}}. If \code{legend.func} is NULL, there is no legend.
\item[\code{subset}] logical vector or numeric values indicating the subset
of points to be plotted.
\item[\code{labels}] One or more character strings or expressions specifying the text to be written.
\item[\code{...}] Optional graphical parameters, see \code{\LinkA{par}{par}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function calls the general function \code{\LinkA{maPlot.func}{maPlot.func}},
which is not specific to microarray data. If there are more than one
array in the batch, the plot is done for the first array, by
default. Default graphical parameters are chosen for convenience using
the function \code{\LinkA{maDefaultPar}{maDefaultPar}} (e.g. color palette,  axis
labels,  plot title) but the user has the option to overwrite these
parameters at any point.
\end{Details}
\begin{Author}\relax
Jean Yee Hwa Yang
\end{Author}
\begin{References}\relax
S. Dudoit and Y. H. Yang. (2002). Bioconductor R packages for exploratory analysis and normalization of cDNA microarray data. In G. Parmigiani, E. S. Garrett, R. A. Irizarry and S. L. Zeger, editors, \emph{The Analysis of Gene Expression Data: Methods and Software}, Springer, New York.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{maPlot.func}{maPlot.func}}, \code{\LinkA{maDefaultPar}{maDefaultPar}}, \code{\LinkA{maLoessLines}{maLoessLines}}, \code{\LinkA{maLegendLines}{maLegendLines}}, \code{\LinkA{maText}{maText}}, \code{\LinkA{plot}{plot}}, \code{\LinkA{lowess}{lowess}}, \code{\LinkA{loess}{loess}}, \code{\LinkA{legend}{legend}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

# To see the demo type demo(marrayPlots)

# Examples use swirl dataset, for description type ? swirl
data(swirl)

# Pre-normalization MA-plot for the Swirl 93 array, with the lowess fits for 
# individual print-tip-groups. 
# - Default arguments
plot(swirl[,3])

# Lowess fit using all spots
plot(swirl[,3], zvar=NULL, legend.func=NULL)

# Loess fit using all spots
plot(swirl[,3], zvar=NULL, legend.func=maLegendLines(legend="All spots",col="green"), lines.func=maLoessLines(loess.args=list(span=0.3),col="green"))

\end{ExampleCode}
\end{Examples}


