-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Axes fonts with text.usetex 'true' does not use set font #3999
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
@xkryptor Why did you close this? If you sorted out your problem could you post an update here? If you think the documentation should be improved can you put in a PR to improve them? |
@tacaswell I am sorry, I think I accidently closed it. |
Recommend labeling as need confirmation You'll need latex and the following lines to try to reproduce: from matplotlib import rcParams
rcParams['font.family'] = 'sans-serif'
rcParams['font.sans-serif'] = ['Helvetica']
rcParams['text.usetex'] = True |
I am not sure what the original issue about because in my case the font changes (except the ticks). import matplotlib.pyplot as plt
from matplotlib import rc
rc('text', usetex=True)
for b in [False, True]:
if b:
rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']})
fig, ax = plt.subplots()
ax.set_title('Title')
ax.set_xlabel('X Axis')
ax.set_ylabel('Y Axis')
ax.plot([0, 1], [0, 1])
fig.savefig('issue_3999_%d.png' % int(b))
from matplotlib.testing.compare import save_diff_image
save_diff_image('issue_3999_0.png', 'issue_3999_1.png', 'issue_3999-diff.png') |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
I'll close this as inactive |
I set the font style in the matplotlibrc param file to Helvetica (sans serif) and I set text.usetex to 'True' but the axes fonts use serif fonts. How do I get the axes fonts to use sans serif?
The text was updated successfully, but these errors were encountered: