Title: [Bug]: Eqnarray in AnchoredText results in misplaced text (new in v3.6.0) · Issue #23977 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Eqnarray in AnchoredText results in misplaced text (new in v3.6.0) · Issue #23977 · matplotlib/matplotlib
X Title: [Bug]: Eqnarray in AnchoredText results in misplaced text (new in v3.6.0) · Issue #23977 · matplotlib/matplotlib
Description: Bug summary The title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don't have the time to test it myself. I'll sim...
Open Graph Description: Bug summary The title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don't h...
X Description: Bug summary The title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don'...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23977
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Eqnarray in AnchoredText results in misplaced text (new in v3.6.0)","articleBody":"### Bug summary\r\n\r\nThe title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don't have the time to test it myself. I'll simply keep using v3.5.3, but I hope this helps other people get to the root cause.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib\r\nfrom matplotlib.offsetbox import AnchoredText\r\n\r\nv = matplotlib.__version__\r\nfig, ax = plt.subplots()\r\nx = np.linspace(0, 2*np.pi)\r\ny = np.sin(x)\r\nplt.plot(x, y)\r\n\r\ntext = ('\\\\begin{eqnarray*}'\r\n f'foo \\\\\\\\'\r\n f'{v=} \\\\\\\\'\r\n '\\\\end{eqnarray*}')\r\nat = AnchoredText(text, loc='upper left', prop={'usetex': True})\r\n# at = AnchoredText(text, loc='upper left')\r\nax.add_artist(at)\r\nplt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n\r\n\r\n\r\n### Expected outcome\r\n\r\n\r\n\r\n\r\n### Additional information\r\n\r\nI should mention that when `usetex` is set to False, the text is displayed just fine (by text I mean the code, obviously it doesn't compile), so I can narrow it down at least that much.\r\n\r\n### Operating system\r\n\r\nWindows 11\r\n\r\n### Matplotlib Version\r\n\r\n3.6.0\r\n\r\n### Matplotlib Backend\r\n\r\nQtAgg\r\n\r\n### Python version\r\n\r\nPython 3.10.1\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\npip","author":{"url":"https://github.com/BogdanRajkov","@type":"Person","name":"BogdanRajkov"},"datePublished":"2022-09-21T16:32:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/23977/matplotlib/issues/23977"}
| 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:a9df57ab-961d-9466-ac2e-30065151e938 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC82:6435C:A1896E4:E18EB3D:6A50CA13 |
| html-safe-nonce | e091bf9081b05834fcee2ac3d717979e64965254baa718d6bc81db493c6c3fce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzgyOjY0MzVDOkExODk2RTQ6RTE4RUIzRDo2QTUwQ0ExMyIsInZpc2l0b3JfaWQiOiIzMTE4ODYzOTEzMzU1MTAyNzM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 947b76361b5a343fe3e2cc892f94b24472ff3143ed512106ddb77d9729cc0ff0 |
| hovercard-subject-tag | issue:1381205302 |
| 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/23977/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ce30c82b3ce820e4d081aa77d1bc70b4bc4edf438b8fb6ed97c66040a8a18a71/matplotlib/matplotlib/issues/23977 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ce30c82b3ce820e4d081aa77d1bc70b4bc4edf438b8fb6ed97c66040a8a18a71/matplotlib/matplotlib/issues/23977 |
| og:image:alt | Bug summary The title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don't h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BogdanRajkov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| 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 | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width