Title: `fontset` from `mathtext` throwing error after setting Text `font=` · Issue #20099 · matplotlib/matplotlib · GitHub
Open Graph Title: `fontset` from `mathtext` throwing error after setting Text `font=` · Issue #20099 · matplotlib/matplotlib
X Title: `fontset` from `mathtext` throwing error after setting Text `font=` · Issue #20099 · matplotlib/matplotlib
Description: Bug report This issue was initially reported by the user @ain-soph at the PR #18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on it. Code for reproduction: import matpl...
Open Graph Description: Bug report This issue was initially reported by the user @ain-soph at the PR #18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on...
X Description: Bug report This issue was initially reported by the user @ain-soph at the PR #18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/20099
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`fontset` from `mathtext` throwing error after setting Text `font=`","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nThis issue was initially reported by the user @ain-soph at the PR #18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on it.\r\n\r\nCode for reproduction:\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib\r\n\r\nplt.figure(figsize=(6, 5))\r\nplt.plot(range(11), color=\"0.9\")\r\nmsg = (r\"Normal Text. $Text\\ in\\ math\\ mode:\\ \"\r\n r\"\\int_{0}^{\\infty } x^2 dx$\")\r\nplt.text(1, 7, msg, size=12, font='Arial') # math_fontfamily='cm'\r\nplt.show()\r\n```\r\n\r\n\r\nAnd the outcome is:\r\n```\r\n....\r\n File \"c:\\repos\\matplotlib\\matplotlib\\lib\\matplotlib\\mathtext.py\", line 431, in _parse_cached\r\n else _api.check_getitem(\r\n File \"c:\\repos\\matplotlib\\matplotlib\\lib\\matplotlib\\_api\\__init__.py\", line 187, in check_getitem\r\n raise ValueError(\r\nValueError: None is not a valid value for fontset; supported values are 'cm', 'dejavuserif', 'dejavusans', 'stix', 'stixsans', 'custom'\r\n```\r\n\r\n**Matplotlib version**: 3.4.1.post563+g679ca172e.d20210428\r\n","author":{"url":"https://github.com/diegopetrola","@type":"Person","name":"diegopetrola"},"datePublished":"2021-04-28T17:46:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/20099/matplotlib/issues/20099"}
| 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:4a8819ff-171d-4d99-c521-dcd48173018d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD28:8E3D:16300B2:1D3932C:6A52B59C |
| html-safe-nonce | c68a6a62143995c64d4ae836e012ba91ea63443c93eeb1fe7bb17dab5187419e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDI4OjhFM0Q6MTYzMDBCMjoxRDM5MzJDOjZBNTJCNTlDIiwidmlzaXRvcl9pZCI6IjY5NDczODgzMDM0OTE2NDI3ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e1c63998ee3a4aa161eeea8c39b82b9c4082e7d913b70549fb7f1104e79e650 |
| hovercard-subject-tag | issue:870197538 |
| 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/20099/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3fb4db17a059cbc837e876bc190de8195401413344de8ec8b8224355b12fb3df/matplotlib/matplotlib/issues/20099 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3fb4db17a059cbc837e876bc190de8195401413344de8ec8b8224355b12fb3df/matplotlib/matplotlib/issues/20099 |
| og:image:alt | Bug report This issue was initially reported by the user @ain-soph at the PR #18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | diegopetrola |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width