Title: a bug that latex expression with subscripts exceeds bbox · Issue #14177 · matplotlib/matplotlib · GitHub
Open Graph Title: a bug that latex expression with subscripts exceeds bbox · Issue #14177 · matplotlib/matplotlib
X Title: a bug that latex expression with subscripts exceeds bbox · Issue #14177 · matplotlib/matplotlib
Description: Bug report the background box for a text object that is composed via latex with subscript can not be covered by the box if letting the padding of the box be equal to 0 ax.annotate(r'$A_{\tiny 1}$', xy=(0.5,0.5), bbox=dict(boxstyle='round...
Open Graph Description: Bug report the background box for a text object that is composed via latex with subscript can not be covered by the box if letting the padding of the box be equal to 0 ax.annotate(r'$A_{\tiny 1}$',...
X Description: Bug report the background box for a text object that is composed via latex with subscript can not be covered by the box if letting the padding of the box be equal to 0 ax.annotate(r'$A_{\tiny 1...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14177
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"a bug that latex expression with subscripts exceeds bbox ","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\n\r\nthe background box for a text object that is composed via latex with subscript can not be covered by the box if letting the padding of the box be equal to 0\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\n\r\n\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nax.annotate(r'$A_{\\tiny 1}$', xy=(0.5,0.5), bbox=dict(boxstyle='round,pad=0', fc='w', ec='none'))\r\n```\r\n\r\n**Expected outcome** : the text has a white background as small as possible and include all of the text\r\n\r\n**Actual outcome** : the text always exceeds the bbox unless using a bigger padding that is ugly\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n\r\n\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: windows 10 x64\r\n * Matplotlib version: 3.0.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): tkagg\r\n * Python version: 3.7.0\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/qm1900","@type":"Person","name":"qm1900"},"datePublished":"2019-05-09T13:18:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/14177/matplotlib/issues/14177"}
| 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:3ff352d5-99dc-1d4d-c62e-8cb85b7beb5e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ADE:223B79:1F4D6E:2AF7C9:6A5255B0 |
| html-safe-nonce | 35dd4f4e697a9a29d740c9a2dd1ed392ab8139df6a2303455dc62ea0a771957d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QURFOjIyM0I3OToxRjRENkU6MkFGN0M5OjZBNTI1NUIwIiwidmlzaXRvcl9pZCI6IjQ5ODc1MTE0MjU0MzYxMTIzMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f7ffdc1ca6fa6fa6c63bb6181203d99fd54b944c3d74664de000bf4ebd112a73 |
| hovercard-subject-tag | issue:442232168 |
| 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/14177/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a283a40ce84c1b748c16502e9dd7aa90b8b77917e38ffabd329d369829ef63d/matplotlib/matplotlib/issues/14177 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a283a40ce84c1b748c16502e9dd7aa90b8b77917e38ffabd329d369829ef63d/matplotlib/matplotlib/issues/14177 |
| og:image:alt | Bug report the background box for a text object that is composed via latex with subscript can not be covered by the box if letting the padding of the box be equal to 0 ax.annotate(r'$A_{\tiny 1}$',... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | qm1900 |
| 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