embedPlot {tomoda} | R Documentation

## Embedding plot for sections

### Description

Scatter plot for sections with two-dimenstional embeddings in a `SummarizedExperiment` object. Each point stands for a section.

### Usage

    embedPlot(object, group = "section", method = "TSNE")

### Arguments

`object` | A `SummarizedExperiment` object.
`group` | Character, a variable in slot `meta` defining the groups of sections. Sections in the same group have same colors.
`method` | Character, the embeddings for scatter plot. Must be one of `"TSNE"`, `"UMAP"`, or `"PCA"`.

### Value

A `ggplot` object.

### Examples

    data(zh.data)
    zh <- createTomo(zh.data)
    zh <- runTSNE(zh)
    # Plot TSNE embeddings.
    embedPlot(zh)

    # Plot UMAP embeddings.
    zh <- runUMAP(zh)
    embedPlot(zh, method="UMAP")

    # Color sections by kmeans cluster labels.
    zh <- kmeansClust(zh, 3)
    embedPlot(zh, group="kmeans_cluster")

[Package tomoda version 1.0.0 Index]