Title: Matplotlib cannot find default matplotlib fonts on Scientific linux · Issue #8427 · matplotlib/matplotlib · GitHub
Open Graph Title: Matplotlib cannot find default matplotlib fonts on Scientific linux · Issue #8427 · matplotlib/matplotlib
X Title: Matplotlib cannot find default matplotlib fonts on Scientific linux · Issue #8427 · matplotlib/matplotlib
Description: To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply. Bug report Bug summary Matplotlib cannot seem to find any of its own fonts on...
Open Graph Description: To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply. Bug report Bug summary Matplotlib can...
X Description: To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply. Bug report Bug summary Matplotlib can...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8427
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Matplotlib cannot find default matplotlib fonts on Scientific linux","articleBody":"To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nMatplotlib cannot seem to find any of its own fonts on my Scientific Linux system - I get all sorts of warnings like \"Font family ['STIXNonUnicode'] not found\" and \"findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\".\r\n\r\n**Code for reproduction**\r\n\r\n- A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required\r\n\r\n```python\r\n#!/usr/bin/env python\r\n\r\nimport matplotlib\r\nmatplotlib.use('Agg')\r\n\r\nfrom matplotlib import pyplot as plt\r\nimport numpy as np\r\n\r\n\r\nif __name__ == '__main__':\r\n x = np.linspace(0.0, 5.0, 100)\r\n y = np.cos(2*np.pi*x) * np.exp(-x)\r\n \r\n plt.plot(x, y, 'k')\r\n plt.title('Damped exponential decay')\r\n #plt.text(2, 0.65, r'$\\cos(2 \\pi t) \\exp(-t)$', fontname='DejaVu Sans')\r\n plt.text(2, 0.65, r'$\\cos(2 \\pi t) \\exp(-t)$') \r\n plt.xlabel('time (s)')\r\n plt.ylabel('voltage (mV)')\r\n plt.savefig('output.png')\r\n```\r\n\r\n**Actual outcome**\r\n\r\n- The output produced by the above code, which may be a screenshot, console output, etc.\r\n\r\n```\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1307: UserWarning: findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=400:stretch=normal:size=10.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\r\n UserWarning)\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXGeneral'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1307: UserWarning: findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\r\n UserWarning)\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1307: UserWarning: findfont: Could not match :family=DejaVu Sans:style=italic:variant=normal:weight=normal:stretch=normal:size=10.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\r\n UserWarning)\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1307: UserWarning: findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=700:stretch=normal:size=10.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\r\n UserWarning)\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmsy10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmr10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmmi10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['cmex10'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['DejaVu Sans Display'] not found. Falling back to DejaVu Sans\r\n (prop.get_family(), self.defaultFamily[fontext]))\r\n/home/pager/miniconda/envs/pager/lib/python3.6/site-packages/matplotlib/font_manager.py:1307: UserWarning: findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=400:stretch=normal:size=12.0. Returning /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf\r\n UserWarning)\r\n\r\n```\r\n\r\n**Expected outcome**\r\nOn my Mac, there are no warnings.\r\n**Matplotlib version**\r\nmatplotlib.__version__ =\u003e '2.0.0'\r\n\r\nPython 3.6.1 | packaged by conda-forge | (default, Mar 23 2017, 21:05:12) \r\n\r\nLinux localhost 3.10.0-514.10.2.el7.x86_64 #1 SMP Thu Mar 2 11:21:24 CST 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\nScientific Linux release 7.3 (Nitrogen)\r\n\r\nPython and matplotlib were both installed using conda from conda-forge.\r\n\r\nAlso, I have made NO customizations in any matplotlibrc files, and there are no files under ~/.config/matplotlib.\r\n\r\nThe actual problem caused by all of this is of course in a much more complicated application, where a map I'm making has the wrong font (italicized, at that) in it when created on Linux.\r\n\r\nIncidentally, I could *really* use a workaround, as I was hoping to deploy some code on Linux this week. Is there a way to tell matplotlib (perhaps in a matplotlibrc file) where to find the true type fonts that are included with the distribution?\r\n\r\n\r\n","author":{"url":"https://github.com/mhearne-usgs","@type":"Person","name":"mhearne-usgs"},"datePublished":"2017-04-04T13:27:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8427/matplotlib/issues/8427"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea4ef34a-6500-ff61-0d6c-7485c3d0ac65 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8B8:2BD65D:7FCBF3:A9D4A0:6A51A720 |
| html-safe-nonce | 0f60a758006c49e254d3264a45ced0703d7d564a5147e84ef2e3e3fe072d0a6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEI4OjJCRDY1RDo3RkNCRjM6QTlENEEwOjZBNTFBNzIwIiwidmlzaXRvcl9pZCI6IjczMTE0MTg4MjY1Nzg1Njg5OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 758e7b0392f1c2a77af8db4f16c44abc40c441d3ba2b656566b3bfbe3d13f181 |
| hovercard-subject-tag | issue:219250045 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/8427/issue_layout |
| twitter:image | https://opengraph.githubassets.com/824c3d0ab69b35107bfa171bd79b81443ac242eafba66aa70b8d284c983f203d/matplotlib/matplotlib/issues/8427 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/824c3d0ab69b35107bfa171bd79b81443ac242eafba66aa70b8d284c983f203d/matplotlib/matplotlib/issues/8427 |
| og:image:alt | To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply. Bug report Bug summary Matplotlib can... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mhearne-usgs |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width