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
Labels
Milestone
Description
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