-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
setting font.family: serif
does not change math font to serif.
#8702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Your
should give you what you want. |
Wow, this is really unexpected. For me at least. |
TODO:
|
Fixed by #8853 |
I think this is something that should not be "fixed" by adding documentation, but, you know, actually be fixed. |
@maxnoe Not clear what you mean by "actually be fixed". The font set used for normal text is necessarily different from the one for MathText. As an example, Comic Sans MS does not have an integral symbol, right? So it makes sense to set both types individually with the respective rcParams. |
This is changed behaviour compared to previous versions. Math sans text is in itself something very rare and not well supported (E.g. there is no open type math sf font). But one should have at least have the option to just set a family then for math fonts. E.g. |
Also, Deja Vu Serif isn't actually a math font. There is TeX Gyre DejaVu Math, is matplotlib using this? All math fonts i know are serif fonts:
¹ commercial or proprietary fonts |
The font tables for the DejaVu fonts can be found at https://dejavu-fonts.github.io/Samples.html There are currently 5 supported math fontsets ('dejavusans' (default), 'dejavuserif', 'cm' (Computer Modern), 'stix', 'stixsans'). You are able to select any of those via the In any case if you feel that the current documentation can be improved at any point, people will be happy to hear your suggestions. |
Bug report
Bug summary
Setting
Does not effect math text like
ax.set_xlabel('$E / \mathrm{GeV}$')
.Code for reproduction
Actual outcome
sans-serif font for the axis label using math
Expected outcome
Both axes labels using serif font
Matplotlib version
The text was updated successfully, but these errors were encountered: