# Change the font family for scanpy.pl in linux

**URL:** <https://discourse.scverse.org/t/change-the-font-family-for-scanpy-pl-in-linux/2197>\
**Category:** scanpy\
**Created:** [April 5, 2024, 6:12pm UTC](https://discourse.scverse.org/t/change-the-font-family-for-scanpy-pl-in-linux/2197 "2024-04-05T18:12:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmnzo5gy](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@hmnzo5gy](https://discourse.scverse.org/u/hmnzo5gy)\
**Post date:** [April 5, 2024, 6:12pm UTC](https://discourse.scverse.org/t/change-the-font-family-for-scanpy-pl-in-linux/2197/1 "2024-04-05T18:12:23Z")

</div>

I would like to change the fonts for scanpy plots labels into Arial or Helvetica but when I change font type using the following settings, nothing changed in the font family.

```auto
import scanpy as sc
import matplotlib as plt
sc.settings.set_figure_params(dpi=100,dpi_save=400,frameon=False,transparent=True)
plt.rcParams["pdf.fonttype"]=42

```

Is there any way for me to specify font family in scanpy.pl?

---

<div class="post-metadata">

**Author:** ![ivirshup](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/ivirshup/32/160_2.png) [@ivirshup](https://discourse.scverse.org/u/ivirshup)\
**Post date:** [April 11, 2024, 12:00pm UTC](https://discourse.scverse.org/t/change-the-font-family-for-scanpy-pl-in-linux/2197/2 "2024-04-11T12:00:53Z")

</div>

I think `fonttype` is more of a technical detail about how fonts work: [Fonts in Matplotlib — Matplotlib 3.8.4 documentation](https://matplotlib.org/stable/users/explain/text/fonts.html#fonts-in-pdf-and-postscript)

You can set the default font with the `plt.rcParams["font.family"]` setting

[https://matplotlib.org/stable/gallery/text\_labels\_and\_annotations/font\_family\_rc.html](https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html)

You can probably also access the object directly, but I’m not sure how.

@Hrovatin may know an even better way.
