Title: 'mathtext.fontset' is only available as an rcParam, should be carried along with text object · Issue #7107 · matplotlib/matplotlib · GitHub
Open Graph Title: 'mathtext.fontset' is only available as an rcParam, should be carried along with text object · Issue #7107 · matplotlib/matplotlib
X Title: 'mathtext.fontset' is only available as an rcParam, should be carried along with text object · Issue #7107 · matplotlib/matplotlib
Description: Matplotlib version 1.5.1 Installed via Anaconda Issue: When formatting labels (or any text object), one may specify a fontdict dictionary of options. This fontdict supersedes the rcParams and ensures that the text object is always render...
Open Graph Description: Matplotlib version 1.5.1 Installed via Anaconda Issue: When formatting labels (or any text object), one may specify a fontdict dictionary of options. This fontdict supersedes the rcParams and ensur...
X Description: Matplotlib version 1.5.1 Installed via Anaconda Issue: When formatting labels (or any text object), one may specify a fontdict dictionary of options. This fontdict supersedes the rcParams and ensur...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7107
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"'mathtext.fontset' is only available as an rcParam, should be carried along with text object","articleBody":"Matplotlib version 1.5.1\nInstalled via Anaconda\n\n**Issue:** When formatting labels (or any text object), one may specify a `fontdict` dictionary of options. This `fontdict` supersedes the rcParams and ensures that the text object is always rendered correctly. However, if the text object includes math between dollar signs (i.e. `'$a=5$'`) and the `matplotlib.mathtext.Parser` is used to render the math, the font-face for the rendered math is specifiable only in the rcParams. This makes it impossible to specify an explicit font face for math within a text object, as whenever that object renders, the math font will always be set by the `'mathtext.fontset'` rcParam. This is especially problematic when using matplotlib in interactive mode (i.e. IPython), as every time the text object is rendered, the math font face will change appearance based on the current rcParam value, but all of the other font attributes will continue to be set by the associated `fontdict`.\n\nThis may not seem like a big deal, but imagine a developer releases a function to a user that returns a figure object with math in the labels. The developer has chosen to use a sans-serif face for the math, and so changes the rcParams (as this is currently the only handle). Now any future plots the user generates during that interactive session (or in the same script) will silently use the modified rcParam, rather than the users' chosen default, contrary to expectations.\n\n**Suggested fix:** add a `mathdict` arg to text objects, which would be analogous to the `fontdict` arg, but for all the mathtext rcParams, and pass that to the mathtext parser.\n","author":{"url":"https://github.com/FaustinCarter","@type":"Person","name":"FaustinCarter"},"datePublished":"2016-09-13T22:28:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/7107/matplotlib/issues/7107"}
| 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:916413bb-feb3-bce6-2c1e-dc9f4f58b92a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91CC:144DCD:2A2E64:39699B:6A526E86 |
| html-safe-nonce | f51c1dbc7ff4b0a17aaca419efd803b9a3d60bc06c348a9e29899bd924168094 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUNDOjE0NERDRDoyQTJFNjQ6Mzk2OTlCOjZBNTI2RTg2IiwidmlzaXRvcl9pZCI6IjYxMTYxMzU3OTMyNDMzNTI3MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2198f74667132b2ed3858fa6d31855925ad9c20b07b69e51f42f959658d3a8e3 |
| hovercard-subject-tag | issue:176766850 |
| 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/7107/issue_layout |
| twitter:image | https://opengraph.githubassets.com/61c5b3e5071045425f6c863354dae4953c6798b45a5362e3b60193cfc23749ea/matplotlib/matplotlib/issues/7107 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/61c5b3e5071045425f6c863354dae4953c6798b45a5362e3b60193cfc23749ea/matplotlib/matplotlib/issues/7107 |
| og:image:alt | Matplotlib version 1.5.1 Installed via Anaconda Issue: When formatting labels (or any text object), one may specify a fontdict dictionary of options. This fontdict supersedes the rcParams and ensur... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FaustinCarter |
| 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