-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
Bug report
The bundled font cmr10
(and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to this website anyways) is actually mappted to the overdot.
See this StackOverflow for details, but I'll repeat here.
Code for reproduction
import matplotlib.pyplot as plt
plt.rcParams.update({
'font.family': 'serif',
'font.serif': 'cmr10',
})
variable = range(5)
plt.plot(variable, variable, label='test_underscore')
plt.plot(variable, variable, label='escape\_underscore')
plt.plot(variable, variable, label=r'rawtest_underscore')
plt.plot(variable, variable, label=r'rawescape\_underscore')
_=plt.legend()
Actual outcome
Expected outcome
Matplotlib version
- Operating system: Manjaro 19.0.2
- Matplotlib version: 3.1.3
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.7.6
Other
cmr10
loaded into FontForge shows that:
A) the underscore character doesn't exist
B) the normal underscore character (005f
) is replaced by the overdot