Title: macosx backend doesn't support numeric fontweight · Issue #3330 · matplotlib/matplotlib · GitHub
Open Graph Title: macosx backend doesn't support numeric fontweight · Issue #3330 · matplotlib/matplotlib
X Title: macosx backend doesn't support numeric fontweight · Issue #3330 · matplotlib/matplotlib
Description: When providing a TrueType-style fontweight value, the macosx backend raise a TypeError: import matplotlib.pyplot as plt fig = plt.figure() fig.text(.5, .5, 'a', fontweight=700) plt.show() Traceback (most recent call last): File "/usr/loc...
Open Graph Description: When providing a TrueType-style fontweight value, the macosx backend raise a TypeError: import matplotlib.pyplot as plt fig = plt.figure() fig.text(.5, .5, 'a', fontweight=700) plt.show() Traceback...
X Description: When providing a TrueType-style fontweight value, the macosx backend raise a TypeError: import matplotlib.pyplot as plt fig = plt.figure() fig.text(.5, .5, 'a', fontweight=700) plt.show() T...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3330
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"macosx backend doesn't support numeric fontweight","articleBody":"When providing a TrueType-style fontweight value, the macosx backend raise a TypeError:\n\n``` python\nimport matplotlib.pyplot as plt\nfig = plt.figure()\nfig.text(.5, .5, 'a', fontweight=700)\nplt.show()\n```\n\n```\nTraceback (most recent call last):\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/artist.py\", line 59, in draw_wrapper\n draw(artist, renderer, *args, **kwargs)\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/figure.py\", line 1079, in draw\n func(*args)\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/artist.py\", line 59, in draw_wrapper\n draw(artist, renderer, *args, **kwargs)\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/text.py\", line 538, in draw\n bbox, info, descent = self._get_layout(renderer)\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/text.py\", line 311, in _get_layout\n ismath=False)\n File \"/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-x86_64.egg/matplotlib/backends/backend_macosx.py\", line 166, in get_text_width_height_descent\n six.text_type(s), family, size, weight, style)\nTypeError: must be string, not int\n```\n\nWhereas providing a string representation works as expected:\n\n``` python\nimport matplotlib.pyplot as plt\nfig = plt.figure()\nfig.text(.5, .5, 'a', fontweight='bold')\nplt.show()\n```\n\n(I didn't get this issue under Ubuntu, but I wouldn't know which backend was used.)\n","author":{"url":"https://github.com/fcolas","@type":"Person","name":"fcolas"},"datePublished":"2014-07-30T20:34:52Z","url":"https://github.com/matplotlib/matplotlib/issues/3330"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:4870ae67-98a6-789b-e73f-f1a6dc7fa8e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A42E:120815:638862:89FAE3:6B069166 |
| html-safe-nonce | be7d69a0ac2282154bf18da7abfaa151f213d70fd2380c89d5542a3b93ed34db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDJFOjEyMDgxNTo2Mzg4NjI6ODlGQUUzOjZCMDY5MTY2IiwidmlzaXRvcl9pZCI6IjQ2MTQ0NDQyMzUzMzU1Njk3NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 463c16b19953385d0eeffe62412f4223e252fef59884192f02c9a1f3a0d05cb6 |
| hovercard-subject-tag | issue:39134169 |
| 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/3330/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19e3703aa8e81707eaaa275528077ae846492b1a297618f11890e094688c61e6/matplotlib/matplotlib/issues/3330 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19e3703aa8e81707eaaa275528077ae846492b1a297618f11890e094688c61e6/matplotlib/matplotlib/issues/3330 |
| og:image:alt | When providing a TrueType-style fontweight value, the macosx backend raise a TypeError: import matplotlib.pyplot as plt fig = plt.figure() fig.text(.5, .5, 'a', fontweight=700) plt.show() Traceback... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fcolas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| 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 | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width