\HeaderA{plotvar.FCS}{Making Univariate/Bivariate plots of the column variables of a FCS object}{plotvar.FCS}
\keyword{hplot}{plotvar.FCS}
\begin{Description}\relax
A univariate histogram or scatterplot will be made for a single column
variable specified from the data of the FCS object, or a bivariate
scatterplot or contour-image scatter plot will be shown for any two
variables specified in the FCS object.
\end{Description}
\begin{Usage}
\begin{verbatim}
plotvar.FCS(x, varpos, type = c("uni", "bi"), 
           plotType = c("hist", "ContourScatterPlot", "plot"),
           names.var = NULL, title.pl = "",
           xlimit = NULL, ylimit = NULL, plot.freq = TRUE,
           color.hist.plot = "white", CSPlot = TRUE,
           hexbin.CSPlot=TRUE,
           hexbin.style.CSPlot=c("colorscale", "lattice", "centroids",
                "nested.lattice", "nested.centroids"),
           n.hexbins.CSPlot=100,
           x.grid.CSPlot = seq(0, 1025, by = 25),
           y.grid.CSPlot = seq(0, 1025, by = 25),
           image.col.CSPlot = heat.colors(2),
           numlev.CSPlot = 25,
           xaxt="s", yaxt="s",
           MY.DEBUG = FALSE,...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] FCS object
\item[\code{varpos}] the numerical column variable position of the data of
the FCS object
\item[\code{type}] character string specifying the type of plot; either "uni"
for univariate or "bi" for bivariate; currently this option need not
be specified because of automatic detection within the function
\item[\code{plotType}] the type of plot to be used; either \code{plot}, \code{hist},
\code{ContourScatterPlot}; currently this option need not
be specified because of automatic detection within the function; a
univariate histogram plot is default when varpos is a single numeric
value, and a default contour-image scatter plot with hexagonal
binning or rectangular binning is displayed for a bivariate plot.
\item[\code{names.var}] (optional) character string or vector of characte strings
of the variable or variables to be plotted; default is NULL and will
be changed to the names specified in the data of the FCS object
\item[\code{title.pl}] character string of the plot title (main)
\item[\code{xlimit}] numerical vector of the range of the x variable
(horizontal axis)
\item[\code{ylimit}] numerical vector of the range of the y variable
(vertical axis)
\item[\code{plot.freq}] boolean; if TRUE, then the frequencies instead of the
relative frequencies are plotted (only if plotType=hist)
\item[\code{color.hist.plot}] character string or numerical value indicating
the color of the histogram plot
\item[\code{CSPlot}] a boolean of whether or not this is a
ContourScatterPlot; if FALSE then an ordinary scatterplot is
produced
\item[\code{hexbin.CSPlot}] boolean; if TRUE then the grid
cells/compartments are hexagons; otherwise the grid cells are
rectangular; default value is TRUE
\item[\code{hexbin.style.CSPlot}] the style of hexbin plot; default is
"colorscale" (for ContourScatterPlot hexagonal binning ONLY!) 
\item[\code{n.hexbins.CSPlot}] number of xbins for hexagon binning; default
is 100 (for ContourScatterPlot hexagonal binning ONLY!)
\item[\code{x.grid.CSPlot}] a numeical sequence denoting the grid marks for
the x coordinate (for ContourScatterPlot rectanglar binning ONLY!)
\item[\code{y.grid.CSPlot}] a numerical sequence denoting the grid marks for
the y coordinate (for ContourScatterPlot rectanglar binning ONLY!)
\item[\code{image.col.CSPlot}] a color map for the image (for
ContourScatterPlot rectanglar binning ONLY!)
\item[\code{numlev.CSPlot}] number of levels for the contours in a ContourScatterPlot (for
ContourScatterPlot rectanglar binning ONLY!)
\item[\code{xaxt}] if "s", then the x-axis is plotted, if "n" then there is no
x-axis plotted (for
ContourScatterPlot rectanglar binning ONLY!)
\item[\code{yaxt}] if "s", then the y-axis is plotted, if "n" then there is no
y-axis plotted (for
ContourScatterPlot rectanglar binning ONLY!)
\item[\code{MY.DEBUG}] boolean; if TRUE then the variable check statements are
printed; default is FALSE
\item[\code{...}] \code{plot} options (for histograms and ContourScatterPlot
hexagonal binning) or \code{contour} options for ContourScatterPlot
rectangular binning
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Other options from the functions \code{\LinkA{plot}{plot}},
\code{\LinkA{hist}{hist}}, \code{\LinkA{ContourScatterPlot}{ContourScatterPlot}} may be
used in the signature of this function to define the plot further.
\end{Details}
\begin{Value}
Either a univariate or a bivariate plot of the specified variable(s)
of the FCS object.  A \code{\LinkA{hist}{hist}} plot will output the breaks and bins of the
histogram.
\end{Value}
\begin{Section}{WARNING}
Please read the warning for \code{\LinkA{ContourScatterPlot}{ContourScatterPlot}}.
\end{Section}
\begin{Note}\relax
For a description of colors please look up \code{\LinkA{colors}{colors}},
\code{\LinkA{palette}{palette}}, and \code{\LinkA{heat.colors}{heat.colors}}
\end{Note}
\begin{Author}\relax
A.J. Rossini and J.Y. Wan
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{ContourScatterPlot}{ContourScatterPlot}},
\code{\LinkA{plot}{plot}}, \code{\LinkA{hist}{hist}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

  ### to identify all the colors available on your system
  colors()
  if (interactive()) {
    if (require(rfcdmin)) {

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

      ## univariate plot
      plotvar.FCS(unst.1829, varpos=1)

      ## bivariate plot :hexagonal binning
      plotvar.FCS(unst.1829, varpos=c(1,2))

      ## bivariate plot :rectangonal binning
      plotvar.FCS(unst.1829, varpos=c(1,2), hexbin.CSPlot=FALSE)
    }
  }

\end{ExampleCode}
\end{Examples}

