satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 907 forks source link

When using the UMAPPlot function to draw a plot, the background color of the label box does not match the clustering color of split.by. #8637

Open znxfdd opened 6 months ago

znxfdd commented 6 months ago

When using the UMAPPlot function to draw a plot, the background color of the label box does not match the clustering color of split.by. How can I correct this error? code: library('RColorBrewer') pal2 <- c(brewer.pal(8, "Set1")) UMAPPlot(pbmc,label = TRUE, repel = T,cols=pal2,label.box=T, label.size=4,split.by = 'orig.ident')

image
jdrnevich commented 6 months ago

FWIW - it happens because of the split.by argument. If you take it out, then the box colors match the cluster colors. I have no idea of a fix...