FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Axes fonts with text.usetex 'true' does not use set font · Issue #3999 · matplotlib/matplotlib · GitHub

Repository navigation

Axes fonts with text.usetex 'true' does not use set font #3999

Closed as not planned

Description

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?

Activity

  1. tacaswell commented on Jan 14, 2015

    Member

    @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?

  2. xkryptor commented on Jan 14, 2015

    Author

    @tacaswell I am sorry, I think I accidently closed it.

  3. petehuang commented on Dec 30, 2016

    Contributor

    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
  4. Kojoley commented on Jan 4, 2017

    Member

    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')



  5. github-actions commented on Mar 10, 2023

    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!

  6. jklymak commented on Mar 10, 2023

    Member

    I'll close this as inactive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL