Learn R Programming

phateR (version 1.0.7)

ggplot.phate: Convert a PHATE object to a data.frame for ggplot

Description

Passes the embedding matrix to ggplot with column names PHATE1 and PHATE2

Usage

# S3 method for phate
ggplot(data, ...)

Arguments

data

A fitted PHATE object

...

Arguments for ggplot()

Examples

Run this code
# NOT RUN {
if (reticulate::py_module_available("phate") && require(ggplot2)) {

# data(tree.data)
# We use a smaller tree to make examples run faster
data(tree.data.small)
phate.tree <- phate(tree.data.small$data)
ggplot(phate.tree, aes(x=PHATE1, y=PHATE2, color=tree.data.small$branches)) +
  geom_point()

}
# }

Run the code above in your browser using DataLab