0

when I use \textmu in labels, it is exported in a shrinked form in vector graphics such as svg and pdf (see 1st picture). If i save the file as a .jpeg for example it is displayed correctly (2nd picture).

I am using Matplotlib v3.8.1 on Windows 10 and python 3.11.5 with text.usetex: True

Happy for any ideas on what is going wrong here and how to fix it. I need the \textmu for scientific publication, where the letter has to be upright (upgreek package cant help due to non-matching font with cm/lm roman)

Example Code and Results

fig, ax = plt.subplots(figsize=(6, 6*0.75))
ax.set_xlabel(r"Time [\textmu s]")
fig.savefig(os.path.join(figure_save_path, "Test.svg"), bbox_inches='tight')

Output SVG:

Shrinked \textmu in xlabel

Output JPEG enter image description here

0

Browse other questions tagged or ask your own question.