I'd like to generate ggplot2 scatter plot clearly shows pileup of points within clusters.
I am using ggplot2 draw tSNE/Umap of single cell RNAseq data that displays multiple clusters. What I need is a script that allows me to show pileups of individual points within a cluster more clearly.
This ggplot2 script was used to generate a following plot with no pileup;
ggplot(ap.int.dt,aes(UMAP_1,UMAP_2,color=immgen.main))
+geom_point(size=1, shape=1,alpha=0.3)
+scale_color_manual(values =color_clusters)

This is a plot that I'd like to generate (generated by a SinglerR package and a companion visualization web site).

Are you looking for an outlines on your points? Youll need to use 'shape' 21-25 because these have both 'fill' and 'color' properties.
ggplot(df) +
geom_point(aes(x = V1,y = V2), shape=21, color = 'black', fill = "green", size = 4) +
geom_point(mapping = aes(x = V1.1,y = V2.1))

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With