cytof_clusterPlot {cytofkit} | R Documentation

## Scatter plot of the cluster results

### Description

Dot plot visualization of the cluster results, with color indicating different clusters, and shape of different samples.

### Usage

    cytof_clusterPlot(data, xlab, ylab, cluster, sample, title = "cluster",
      type = 1, point_size = NULL, addLabel = TRUE, labelSize = 10,
      sampleLabel = TRUE, labelRepel = FALSE, fixCoord = TRUE, clusterColor)

### Arguments

`data` | The data frame of cluster results, which should contains at least xlab, ylab and cluster.
`xlab` | The column name of the x axis in input `data`.
`ylab` | The column name of the y axis in input `data`.
`cluster` | The column name of cluster in input `data`.
`sample` | The column name of the sample in input `data`.
`title` | The title of the plot.
`type` | Plot type, 1 indicates combined plot, 2 indicated grid facet plot seperated by samples.
`point_size` | Size of the dot.
`addLabel` | If `TRUE`, add cluster labels.
`labelSize` | Size of cluster labels.
`sampleLabel` | If `TRUE`, use point shapes to represent different samples.
`labelRepel` | If `TRUE`, repel the cluste labels to avoid label overlapping.
`fixCoord` | If `TRUE`, fix the Cartesian coordinates.
`clusterColor` | Manually specify the colour of each cluster (mainly for ShinyAPP usage).

### Value

The ggplot object of the scatter cluster plot.

### Examples

    x <- c(rnorm(100, mean = 1), rnorm(100, mean = 3), rnorm(100, mean = 9))
    y <- c(rnorm(100, mean = 2), rnorm(100, mean = 8), rnorm(100, mean = 5))
    c <- c(rep(1,100), rep(2,100), rep(3,100))
    rnames <- paste(paste('sample_', c('A','B','C'), sep = ''), rep(1:100,each = 3), sep='_')
    data <- data.frame(dim1 = x, dim2 = y, cluster = c)
    rownames(data) <- rnames
    data$sample <- "data"
    cytof_clusterPlot(data, xlab="dim1", ylab="dim2", cluster="cluster", sample = "sample")

[Package cytofkit version 1.12.0 Index]