\HeaderA{plot.ProbBin.FCS}{Plots a ProbBin.FCS object}{plot.ProbBin.FCS}
\keyword{hplot}{plot.ProbBin.FCS}
\begin{Description}\relax
A ProbBin.FCS object plot results in two histograms--one for the 
stimulated sample and one for the unstimulated sample.
\end{Description}
\begin{Usage}
\begin{verbatim}
  plot.ProbBin.FCS(x, xlab=x$varname,
               xlim=c(min(c(round(range(x$st.hist$breaks),1) + 1, 
                  round(range(x$unst.hist$breaks),1) + 1)), 
                  max(c(round(range(x$st.hist$breaks),1) + 1, 
                  round(range(x$unst.hist$breaks),1) + 1))),
            
              main="", 
              labels=FALSE, 
              freq=FALSE, plots.made=c("both", "stimulated", "unstimulated"), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] ProbBin.FCS object
\item[\code{xlab}] Character string of the x-axis; 
default is the variable name
\item[\code{xlim}] vector of length 2 denoting the minimum and the maximum value of the 
breakpoint values, x-axis; default is the minimum and the maximum of the breakpoints
for both stimulated and unstimulated samples
\item[\code{main}] character string of the title of the file (ie, individual
id number)
\item[\code{labels}] Boolean; if TRUE, then the number/precentage in each bin is
printed on the histogram, otherwise it is not; default is FALS
\item[\code{freq}] Boolean; if TRUE, then the histogram is in terms of
counts; if FALSE, then the histogram is in terms of relative
frequencies/precentages; if TRUE and the areas in plot are wrong
is output as a warning.
\item[\code{plots.made}] character string denoting which histogram plot should be 
displayed; default is "both"
\item[\code{...}] plotting options such as 'ylab' and 'ylim'
to pass to \LinkA{hist}{hist}

\end{ldescription}
\end{Arguments}
\begin{Value}
Two histograms (one of the stimulated sample, and the other of the
unstimulated sample) are displayed or only one histogram plot 
specified by the user will be displayed.
\end{Value}
\begin{Author}\relax
A.J. Rossini \& J.Y. Wan
\end{Author}
\begin{References}\relax
Mario Roederer, et al. "Probability Binning Comparison: A
Metric for Quantitating Univariate Distribution Differences" Cytometry
45:37-46 (2001).
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{hist}{hist}}, \code{\LinkA{ProbBin.FCS}{ProbBin.FCS}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

if (require(rfcdmin)){

if (!( is.element("st.1829", objects()) & is.element("unst.1829",
objects()) )){
## obtaining the FCS objects from VRC data
data(VRCmin)
}

## This only serves as an example.
## Gating/subsetting should precede this analysis
IFN.gamma.1<-unst.1829@data[1:2000,4]
IFN.gamma.2<-st.1829@data[1:2000,4]

#Probability binning using the control dataset to determine the breaks
PB1<-ProbBin.FCS(IFN.gamma.1, IFN.gamma.2, 200,
varname=colnames(unst.1829@data)[4], PBspec="by.control",MY.DEBUG=FALSE)

## Probability Binning using the combined dataset (control and stimulated)
## to determing the breaks
PB2<-ProbBin.FCS(IFN.gamma.1, IFN.gamma.2, 200,
varname=colnames(unst.1829@data)[4], PBspec="combined",MY.DEBUG=FALSE)

if (interactive()){
par(mfrow=c(2,2))
## plots both plots
plot(PB1, ylim=c(0,500),main="Prob Binning using the Control dataset")

## plots only the unstimulated
plot(PB2, main="Prob Binning using the Combined Dataset", plots.made="unstimulated")

## plots only the stimulated
plot(PB2, main="Prob Binning using the Combined Dataset", plots.made="stimulated")
}

}

\end{ExampleCode}
\end{Examples}

