\HeaderA{plot}{Plot a sample point matrix}{plot}
\aliasA{plot,samplePointMatrix,missing-method}{plot}{plot,samplePointMatrix,missing.Rdash.method}
\aliasA{plot,scaleSpace,missing-method}{plot}{plot,scaleSpace,missing.Rdash.method}
\keyword{hplot}{plot}
\begin{Description}\relax
Plot the sample point matrix or parts of it
\end{Description}
\begin{Usage}
\begin{verbatim}
plot(x,y, ...)
## S4 method for signature 'scaleSpace, missing':
plot(x, y, spm, type='b', ...)
## S4 method for signature 'samplePointMatrix, missing':
plot(x, y, type="b", sigLevels=NULL, chromosomes=NULL, colinAxis=NULL, fillColor=NULL, maploc=NULL, interpolation=1, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] either an object of class samplePointMatrix or scaleSpace
\item[\code{y}] object of class missing
\item[\code{type}] Determines which data is plotted. 'g' for gains only, 'l' for losses only and 'b' and '1' for both in one plot device
\item[\code{spm}] add stuff here
\item[\code{sigLevels}] If given, the cutoffs will be drawn as lines in the plots. Optional 
\item[\code{chromosomes}] Takes a vector of chromosomes to be plotted. Defaults to all chromosomes. 
\item[\code{colinAxis}] Allows you to override default behaviour of axis labeling. Choose False for genomic position labeling for each individual chromosome, True for colinear labeling.
\item[\code{fillColor}] Allows you to choose the colors used to fill the significant areas under the curve. Takes a list with the 'pos' element giving the color for the gains and the 'neg' element the color for the losses. 
\item[\code{maploc}] Currently not in use
\item[\code{interpolation}] Determines which points from the sample point matrix will actually be plotted. If the value of 'interpolation' is n, then every n-th point will be plotted. The default value of 1 will results in all points being plotted. This can be useful when a high density sample point matrix results in big file size when exporting the image (especially to pdf or eps format).
\item[\code{...}] Any other parameters you would like to pass to 'plot'. See 'par' for more details.
\end{ldescription}
\end{Arguments}
\begin{Value}
Plots the sample point matrix. The gains and the losses are plotted separately. The KC normalized score is plotted on the y-axis, the genomic position on the x-axis.
If centromeres are present these are represented by dotted, lightblue lines.
Setting type to 'b' or to '1' will both make the plot appear in one plot device, '1' will plot the gains and the losses in one plot, 'b' will plot the gains and losses separately.
The function 'idPoints' can be used to identify points in the sample point matrix plot. See the corresponding documentation for details.
\end{Value}
\begin{Author}\relax
Jorma de Ronde
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{calcSpm}{calcSpm}}, \code{\LinkA{plotScaleSpace}{plotScaleSpace}}, \code{\LinkA{idPoints}{idPoints}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(hsSampleData)
data(hsMirrorLocs)

spm1mb <- calcSpm(hsSampleData, hsMirrorLocs)

plot(spm1mb)
plot(spm1mb, interpolation=10)
plot(spm1mb, chromosomes=c(1,4,'X'))

siglevel1mb <- findSigLevelTrad(hsSampleData, spm1mb, n=3)
plot(spm1mb, chromosomes=c(1,4,'X'), sigLevels=siglevel1mb)
plot(spm1mb, chromosomes=c(1,4,'X'), sigLevels=siglevel1mb, fillColor=list(pos='darkred',neg='darkgreen'))

\end{ExampleCode}
\end{Examples}

