plotDimReduceGrid {celda} | R Documentation

## Mapping the dimensionality reduction plot

### Description

Creates a scatterplot given two dimensions from a data dimensionality reduction tool (e.g tSNE) output.

### Usage

    plotDimReduceGrid(dim1, dim2, matrix, size, xlab, ylab, colorLow, colorMid,
      colorHigh, varLabel)

### Arguments

`dim1` | Numeric vector. First dimension from data dimensionality reduction output.
`dim2` | Numeric vector. Second dimension from data dimensionality reduction output.
`matrix` | Numeric matrix. Each row of the matrix will be plotted as a separate facet.
`size` | Numeric. Sets size of point on plot. Default 1.
`xlab` | Character vector. Label for the x-axis. Default 'Dimension_1'.
`ylab` | Character vector. Label for the y-axis. Default 'Dimension_2'.
`colorLow` | Character. A color available from 'colors()'. The color will be used to signify the lowest values on the scale. Default 'grey'.
`colorMid` | Character. A color available from 'colors()'. The color will be used to signify the midpoint on the scale.
`colorHigh` | Character. A color available from 'colors()'. The color will be used to signify the highest values on the scale. Default 'blue'.
`varLabel` | Character vector. Title for the color legend.

### Value

The plot as a ggplot object

### Examples

    data(celdaCGSim, celdaCGMod)
    celdaTsne <- celdaTsne(counts = celdaCGSim$counts,
        celdaMod = celdaCGMod)
    plotDimReduceGrid(celdaTsne[, 1],
        celdaTsne[, 2],
        matrix = celdaCGSim$counts,
        xlab = "Dimension1",
        ylab = "Dimension2",
        varLabel = "tsne",
        size = 1,
        colorLow = "grey",
        colorMid = NULL,
        colorHigh = "blue")

[Package celda version 1.0.4 Index]