Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
Bug report
The bundled fontcmr10
(and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according tothis website anyways) is actually mappted to the overdot.
Seethis StackOverflow for details, but I'll repeat here.
Code for reproduction
importmatplotlib.pyplotaspltplt.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
Othercmr10
loaded into FontForge shows that:
A) the underscore character doesn't exist
B) the normal underscore character (005f
) is replaced by the overdot