# Adjusting OGSTools plot font size globally

**URL:** <https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617>\
**Category:** Help & Support\
**Created:** [May 8, 2025, 6:46pm UTC](https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617 "2025-05-08T18:46:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chleh](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/chleh/32/854_2.png) [@chleh](https://discourse.opengeosys.org/u/chleh)\
**Post date:** [May 8, 2025, 6:46pm UTC](https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617/1 "2025-05-08T18:46:53Z")

</div>

Hi,

I’d like to adjust the font size in OGSTools (0.6.0) globally.

E.g. I have the following (incomplete) code:

```py
import ogstools as ot
ot.plot.plot_setup_defaults.fontsize = 6 # does not seem to work

...

var_conc = ot.variables.Variable("concentration")

# adding fontsize=... here would work, but it's not a global setting
fig = bulk_mesh_result.plot_contourf(var_conc)

# just for the sake of completeness of the plot below...
ax = fig.gca()
quiv = ax.quiver(bulk_mesh_result.points[:,0], bulk_mesh_result.points[:,1],
          bulk_mesh_result.point_data["v"][:,0], bulk_mesh_result.point_data["v"][:,1],
          pivot="mid")

# I want a smaller plot
fig.set_size_inches(8,6)

```

The resulting plot looks suboptimal:

 ![grafik](https://discourse.opengeosys.org/uploads/default/original/2X/e/eb0849406dc769ead778d515e6306f14710d1fb0.jpeg)

What am I doing wrong?  
Thank you in advance.

Best regards,  
Christoph

---

<div class="post-metadata">

**Author:** ![felikskiszkurno](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/felikskiszkurno/32/968_2.png) [@felikskiszkurno](https://discourse.opengeosys.org/u/felikskiszkurno)\
**Post date:** [May 8, 2025, 7:39pm UTC](https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617/2 "2025-05-08T19:39:34Z")

</div>

Hi,  
you could use update\_font\_sizes from utils module:

```auto
import ogstools as ot
ot.plot.utils.update_font_sizes(ax, fontsize=6)

```

Though you may still need to adjust the sizes of some elements manually.  
Best regards,  
Feliks

---

<div class="post-metadata">

**Author:** ![FZill](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/fzill/32/562_2.png) [@FZill](https://discourse.opengeosys.org/u/FZill)\
**Post date:** [May 9, 2025, 5:40am UTC](https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617/3 "2025-05-09T05:40:06Z")

</div>

If you want a smaller plot, you may be better of passing `dpi=50` (or something like that) to plot\_contourf instead of set\_size\_inches. And instead of your ax.quiver where you need to specify everything you can also do  
`bulk_mesh_result.plot_quiver(ax=fig.axes[0], variable="v", glyph_type="line"`)`

---

<div class="post-metadata">

**Author:** ![chleh](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/chleh/32/854_2.png) [@chleh](https://discourse.opengeosys.org/u/chleh)\
**Post date:** [May 9, 2025, 3:19pm UTC](https://discourse.opengeosys.org/t/adjusting-ogstools-plot-font-size-globally/1617/4 "2025-05-09T15:19:01Z")

</div>

Thank you for your suggestions. I’ll try that.

I am aware of `plot_quiver()`, but it has a hard-coded scale in its implementation, which did not work for me.
