Skip to content

[Bug]: Lowercase Greek letters not showing properly in PDF when using Times font #20827

Closed
@gmatheou

Description

@gmatheou

Bug summary

Lowercase Greek letter not showing properly in PDF when using Times font.
Behavior is fine with other fonts and other outputs.
Please see code.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
import matplotlib

matplotlib.rcParams.update({
    "text.usetex": True,
    "font.family": "serif",
    "font.serif": ["Times"],
})

t = np.arange(0.0, 2.0, 0.01)
s = np.sin(2*np.pi*t)

plt.plot(t, s)
plt.title(r'$\alpha_i > \beta_i \Phi \Xi \Theta \theta \Gamma$', fontsize=20)
plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
         fontsize=20)
plt.xlabel('time (s)')
plt.ylabel('volts (mV)')
#plt.show()


plt.savefig("test.pdf", dpi=400, bbox_inches = 'tight', pad_inches = 0.1)

Actual outcome

test.pdf

Expected outcome

Lowercase greek letters should show properly

Operating system

macOS 11.2.3

Matplotlib Version

3.2.1

Matplotlib Backend

MacOSX

Python version

3.7.10

Jupyter version

No response

Other libraries

No response

Installation

No response

Conda channel

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions