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

**URL:** <https://discourse.scverse.org/t/changing-color-size-of-textfont-with-sc-pl-umap/2467>\
**Category:** scanpy\
**Created:** [August 22, 2024, 12:49pm UTC](https://discourse.scverse.org/t/changing-color-size-of-textfont-with-sc-pl-umap/2467 "2024-08-22T12:49:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LysSanzMoreta](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/lyssanzmoreta/32/972_2.png) [@LysSanzMoreta](https://discourse.scverse.org/u/LysSanzMoreta)\
**Post date:** [August 22, 2024, 12:49pm UTC](https://discourse.scverse.org/t/changing-color-size-of-textfont-with-sc-pl-umap/2467/1 "2024-08-22T12:49:06Z")

</div>

Hi!

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

```python

            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](https://scanpy.readthedocs.io/en/stable/_images/2b92963adeb5c28502e023b24967f509deb537d668944e8bec22585c1e66e341.png)

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

Thanks!

---

<div class="post-metadata">

**Author:** ![emdann](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/emdann/32/254_2.png) [@emdann](https://discourse.scverse.org/u/emdann)\
**Post date:** [August 29, 2024, 7:19pm UTC](https://discourse.scverse.org/t/changing-color-size-of-textfont-with-sc-pl-umap/2467/2 "2024-08-29T19:19:49Z")

</div>

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](https://scanpy.readthedocs.io/en/stable/tutorials/plotting/advanced.html#talking-to-matplotlib).

---

<div class="post-metadata">

**Author:** ![LysSanzMoreta](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/lyssanzmoreta/32/972_2.png) [@LysSanzMoreta](https://discourse.scverse.org/u/LysSanzMoreta)\
**Post date:** [September 4, 2024, 5:34pm UTC](https://discourse.scverse.org/t/changing-color-size-of-textfont-with-sc-pl-umap/2467/3 "2024-09-04T17:34:33Z")

</div>

@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!
