Title: [Bug]: Alignment of minus sign when using LaTeX · Issue #28766 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Alignment of minus sign when using LaTeX · Issue #28766 · matplotlib/matplotlib
X Title: [Bug]: Alignment of minus sign when using LaTeX · Issue #28766 · matplotlib/matplotlib
Description: Bug summary There seems to be a different alignment for the minus sign depending on if the string contains only the minus sign or more characters when LaTeX is used. Code for reproduction import matplotlib.pyplot as plt plt.rcParams.upda...
Open Graph Description: Bug summary There seems to be a different alignment for the minus sign depending on if the string contains only the minus sign or more characters when LaTeX is used. Code for reproduction import ma...
X Description: Bug summary There seems to be a different alignment for the minus sign depending on if the string contains only the minus sign or more characters when LaTeX is used. Code for reproduction import ma...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/28766
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Alignment of minus sign when using LaTeX","articleBody":"### Bug summary\n\nThere seems to be a different alignment for the minus sign depending on if the string contains only the minus sign or more characters when LaTeX is used.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\r\nplt.rcParams.update({\"text.usetex\": True})\r\n\r\nplt.text(0, 0, '$-3$', fontsize=40)\r\nplt.text(0.2, 0, '$-$', fontsize=40)\r\nplt.text(0.28, 0, '$3$', fontsize=40)\r\nplt.ylim(-0.1, 0.1);\r\nplt.axis('off');\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\n\r\n\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacOS Sonoma 14.6.1\n\n### Matplotlib Version\n\n3.9.2\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\n3.10.13\n\n### Jupyter version\n\n6.5.4\n\n### Installation\n\nconda","author":{"url":"https://github.com/johannfaouzi","@type":"Person","name":"johannfaouzi"},"datePublished":"2024-08-29T14:27:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/28766/matplotlib/issues/28766"}
| 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:46c514f4-3894-88c8-2ca6-ee9d45e16154 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4D4:50BAF:FF6903:153A945:6A51C54F |
| html-safe-nonce | 76cc4bab0270c18d9f02f335177ef8012b66a6e7814949553ddd6bfc280f7bae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEQ0OjUwQkFGOkZGNjkwMzoxNTNBOTQ1OjZBNTFDNTRGIiwidmlzaXRvcl9pZCI6IjEzMTc4MzA0NTk2NzYyNzU5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 32253e69ed28f59a1c7505d22639f1ace7c9e86cc2bcae3ddce2a92890742946 |
| hovercard-subject-tag | issue:2494649251 |
| 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/28766/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dc8bee215aeeb53f48e731f208a7555ef470d6bee03501a2fdc0c75d5930e9a6/matplotlib/matplotlib/issues/28766 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dc8bee215aeeb53f48e731f208a7555ef470d6bee03501a2fdc0c75d5930e9a6/matplotlib/matplotlib/issues/28766 |
| og:image:alt | Bug summary There seems to be a different alignment for the minus sign depending on if the string contains only the minus sign or more characters when LaTeX is used. Code for reproduction import ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johannfaouzi |
| 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