plotvar.FCS {rflowcyt} | R Documentation

## Making Univariate/Bivariate plots of the column variables of a FCS object

### Description

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.

### Usage

    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,...)

### Arguments

`x` | FCS object
`varpos` | the numerical column variable position of the data of the FCS object
`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
`plotType` | the type of plot to be used; either `plot`, `hist`, `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.
`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
`title.pl` | character string of the plot title (main)
`xlimit` | numerical vector of the range of the x variable (horizontal axis)
`ylimit` | numerical vector of the range of the y variable (vertical axis)
`plot.freq` | boolean; if TRUE, then the frequencies instead of the relative frequencies are plotted (only if plotType=hist)
`color.hist.plot` | character string or numerical value indicating the color of the histogram plot
`CSPlot` | a boolean of whether or not this is a ContourScatterPlot; if FALSE then an ordinary scatterplot is produced
`hexbin.CSPlot` | boolean; if TRUE then the grid cells/compartments are hexagons; otherwise the grid cells are rectangular; default value is TRUE
`hexbin.style.CSPlot` | the style of hexbin plot; default is "colorscale" (for ContourScatterPlot hexagonal binning ONLY!)
`n.hexbins.CSPlot` | number of xbins for hexagon binning; default is 100 (for ContourScatterPlot hexagonal binning ONLY!)
`x.grid.CSPlot` | a numeical sequence denoting the grid marks for the x coordinate (for ContourScatterPlot rectanglar binning ONLY!)
`y.grid.CSPlot` | a numerical sequence denoting the grid marks for the y coordinate (for ContourScatterPlot rectanglar binning ONLY!)
`image.col.CSPlot` | a color map for the image (for ContourScatterPlot rectanglar binning ONLY!)
`numlev.CSPlot` | number of levels for the contours in a ContourScatterPlot (for ContourScatterPlot rectanglar binning ONLY!)
`xaxt` | if "s", then the x-axis is plotted, if "n" then there is no x-axis plotted (for ContourScatterPlot rectanglar binning ONLY!)
`yaxt` | if "s", then the y-axis is plotted, if "n" then there is no y-axis plotted (for ContourScatterPlot rectanglar binning ONLY!)
`MY.DEBUG` | boolean; if TRUE then the variable check statements are printed; default is FALSE
`...` | `plot` options (for histograms and ContourScatterPlot hexagonal binning) or `contour` options for ContourScatterPlot rectangular binning

### Details

Other options from the functions `plot`, `hist`, `ContourScatterPlot` may be used in the signature of this function to define the plot further.

### Value

Either a univariate or a bivariate plot of the specified variable(s) of the FCS object. A `hist` plot will output the breaks and bins of the histogram.

### WARNING

Please read the warning for `ContourScatterPlot`.

### Note

For a description of colors please look up `colors`, `palette`, and `heat.colors`

### Author(s)

A.J. Rossini and J.Y. Wan

### See Also

`ContourScatterPlot`, `plot`, `hist`

### Examples

      ### 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)
        }
      }

[Package rflowcyt version 1.12.0 Index]