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

Description Usage Arguments Examples

Description

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

Usage

1
2
## S3 method for class 'phate'
ggplot(data, ...)

Arguments

data

A fitted PHATE object

...

Arguments for ggplot()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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()

}

KrishnaswamyLab/phater documentation built on Feb. 14, 2021, 5:17 p.m.