ggcyto-class {ggcyto} | R Documentation

## Plot cytometry data using the ggcyto API

### Description

`ggcyto()` initializes a ggcyto object that inherits ggplot class. Similarly the + operator can be used to add layers to the existing ggcyto object.

### Usage

    ggcyto(data = NULL, ...)

    ## Default S3 method:
    ggcyto(data = NULL, mapping = aes(), ...)

### Arguments

`data` | The data source. A core cytometry data structure. (flowSet,flowFrame, GatingSet or GatingHierarchy)
`...` | other arguments passed to specific methods

### Details

To invoke `ggcyto`:

- `ggcyto(fs, aes(x, y, <other aesthetics>))`

@return ggcyto object

### Examples

    data(GvHD)
    fs <- GvHD[1:3]
    #construct the `ggcyto` object (inherits from `ggplot` class)
    p <- ggcyto(fs, aes(x = `FSC-H`))
    p + geom_histogram()

    # display density/area
    p + geom_density()
    p + geom_area(stat = "density")

    # 2d scatter plot
    p <- ggcyto(fs, aes(x = `FSC-H`, y =  `SSC-H`))
    p + geom_hex(bins = 128)
    # do it programatically through aes_string and variables
    col1 <- "`FSC-H`" #note that the dimension names with special characters needs to be quoted by backticks
    col2 <- "`SSC-H`"
    ggcyto(fs, aes_string(col1,col2)) + geom_hex()

[Package ggcyto version 1.10.2 Index]