Changing color/size of textfont with sc.pl.umap

Hi!

A simple question, I am plotting the leiden clusters using sc.pl.umap in this manner:


            sc.pl.umap(
                dataset,
                layer = "X_umap",
                use_raw=False,
                color="clusters",
                add_outline=True,
                legend_loc="on data",
                legend_fontsize=12,
                legend_fontoutline=2,
                frameon=False,
                title="clustering of cells",
                palette="Set1",
                show=False,
                textfont_color="orange"
            )

How can I manipulate the size and color of the text that is drawn on top of the clusters to indicate their number?

So for example in this figure: Leiden clusters

change the font size or the color of the numbers 1, 2, 3 …,

Thanks!

You can control fontsize by changing legend_fontsize. AFAIK there is no option to change the color of the text, you will need to play with matplotlib for that. You can find tips on how to customize scanpy plots in this tutorial.

@emdann Thanks, yeah, I also thought I would have to fiddle around with matplotlib configurations. I just finger-crossed that perhaps someone had done it already. Thanks!