GGPLOT: UMAP点云图-簇轮廓注释

Code Deom

pacman::p_load(Seurat,dplyr,ggplot2)
remotes::install_github("sajuukLyu/ggunchull")

DimPlot(seurat.object)$data %>% ggplot(aes(UMAP_1,UMAP_2,color = ident,fill = ident)) +
    ggunchull::stat_unchull(alpha = .3, size = .8,linetype = 2,show.legend = F,
                            sfac = 1.8, nbin = 150 ,qval = .5
                            ) +
    geom_point(pch = 21,size = 3,color = "black",stroke = 0.1) +
    tidydr::theme_dr() + theme(panel.grid = element_blank(),
                               plot.margin = unit( c(0.1,0.15,0.1,0.1),"npc"),
                               plot.title = element_text(face = 2,size = 20,hjust = 0.5))  +
    guides(color = guide_legend(override.aes = list(size= 7))) +
    scale_color_brewer(palette = "Paired") +
    scale_fill_brewer(palette = "Paired") +
    labs(title = "UMAP")

Reference

sajuukLyu/ggunchull: A ggplot extension for drawing smooth non-convex circles around a set of points. (github.com)

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
禁止转载,如需转载请通过简信或评论联系作者。

相关阅读更多精彩内容

友情链接更多精彩内容