ggplot.phate {phateR} | R Documentation |
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 class 'phate'
ggplot(data, ...)
Arguments
data |
A fitted PHATE object |
... |
Arguments for ggplot() |
Examples
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()
}
[Package phateR version 1.0.7 Index]