Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version 2.0.0_1 breaks OpenType font character spacing on PDF save #8050

Closed
Milestone
@andermannlab

Description

@andermannlab

Bug report

Bug summary

I know that Matplotlib does not officially support OpenType fonts, but I have successfully been using them for axis labels in version 1.5.3 and earlier. I just updated Matplotlib via Macports and the character spacing and alignment broke, especially with larger font sizes. For example, X axis titles that are centered begin at the same position, but have extra wide spacing. This is found with all OpenType fonts that I have tried.

Code for reproduction

  • This requires the free font Canter (not ideal for graphing, but it is available for testing), but can be reproduced with other fonts.
  • I have only included my setting of the fonts and saving the PDF, as this can be reproduced with any plot I've made.
importmatplotlibasmplimportmatplotlib.pyplotaspltf= {'family':'Canter;, 'weight':'light', 'size':20}mpl.rc('font',**f)plt.savefig('test.pdf',transparent=True)

Actual outcome

170208-correlation-version 2.pdf

Expected outcome

170208-correlation-version 1.5.pdf

  • This worked in v 1.5.3 and does not work in 2.0.0

Matplotlib version

  • Python 2.7, Matplotlib versions 1.5.3 and 2.0.0, installed via macports

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp