Hello,
I want to show on my UMAP, using the DimPlot() function, the same colors on the text labels as the cluster colors. If I set up the same colors in the same order as the levels of my idents, the colors do not correspond at all, I guess the order in which the labels are organised inside the DimPlot() are not the same as the levels of the identities which are given for coloring the cells.
This is my code:
DimPlot(S2, label = T, repel = T, cols = list, label.size = 5, pt.size = 1, label.box = F, label.color = list)
Is there a way to make the colors coincide?
I also opened an github issue on this subject here
I'm sure it's something really obvious to do but I can't find it ...
Thank you!
What does
list
contain? Also, consider not naming variableslist
given that thelist()
function exists.I wrote "list" just for the example, my variable is called differently.
It contains a list of colors
I also tried formatting the list by specifying the cluster name with its color name, but it's ineffective, like this:
What happens if you don't pass the
label.color
argument?The labels stay black
I think the GitHub issue is the place to watch - the source code is too complicated for me to suggest a workaround, maybe the developers can add an option or suggest a quickfix.