ggunchull
2022-10-10 本文已影响0人
可能性之兽
library(Seurat)
library(ggplot2)
library(ggunchull)
data("pbmc3k")
plotData <- as.data.frame(pbmc3k[["tsne"]]@cell.embeddings)
plotData$cluster <- pbmc3k$seurat_clusters
ggplot(plotData, aes(x = tSNE_1, y = tSNE_2, fill = cluster, color = cluster)) +
stat_unchull(alpha = 0.5, size = 2) +
geom_point(size = 0.5) +
theme(
aspect.ratio = 1,
panel.background = element_blank(),
panel.grid = element_blank(),
axis.line = element_line()
)
image.png
sajuukLyu/ggunchull: A ggplot extension for drawing smooth non-convex circles around a set of points. (github.com)