Title: ha="right" breaks AnchoredText placement. · Issue #18363 · matplotlib/matplotlib · GitHub
Open Graph Title: ha="right" breaks AnchoredText placement. · Issue #18363 · matplotlib/matplotlib
X Title: ha="right" breaks AnchoredText placement. · Issue #18363 · matplotlib/matplotlib
Description: Bug report Bug summary Setting ha="right" through the prop kwarg breaks AnchoredText placement. Code for reproduction import matplotlib.pyplot as plt from matplotlib.offsetbox import AnchoredText prop = {"ha": "right", "bbox": {"lw": 0.5...
Open Graph Description: Bug report Bug summary Setting ha="right" through the prop kwarg breaks AnchoredText placement. Code for reproduction import matplotlib.pyplot as plt from matplotlib.offsetbox import AnchoredText p...
X Description: Bug report Bug summary Setting ha="right" through the prop kwarg breaks AnchoredText placement. Code for reproduction import matplotlib.pyplot as plt from matplotlib.offsetbox import Anch...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18363
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ha=\"right\" breaks AnchoredText placement.","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nSetting `ha=\"right\"` through the `prop` kwarg breaks `AnchoredText` placement.\r\n\r\n**Code for reproduction**\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```py\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.offsetbox import AnchoredText\r\n\r\nprop = {\"ha\": \"right\", \"bbox\": {\"lw\": 0.5, \"facecolor\": \"white\"}}\r\ntext_box = AnchoredText(\"test\\ntest long text for ha\", prop=prop, loc=\"upper right\", pad=0.2)\r\nplt.gca().add_artist(text_box)\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nI was expecting the text box to end up in the same place it does when not setting `ha=\"right\"`:\r\n\r\n\r\n\r\n**Matplotlib version**\r\n * Operating system: macOS 10.15.6\r\n * Matplotlib version: 3.2.1 (pip-installed)\r\n * Matplotlib backend: `module://ipykernel.pylab.backend_inline`\r\n * Python version: 3.6.10\r\n","author":{"url":"https://github.com/janosh","@type":"Person","name":"janosh"},"datePublished":"2020-08-27T12:38:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/18363/matplotlib/issues/18363"}
| 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:89b60a1c-3922-1cff-9239-51e99fcbc13e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B098:2D56E3:560EB1:71E64A:6A5303FC |
| html-safe-nonce | cbf7849e90b6f20ef481b7b48ddea7d648431aecd8449d149027022cd03d493c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDk4OjJENTZFMzo1NjBFQjE6NzFFNjRBOjZBNTMwM0ZDIiwidmlzaXRvcl9pZCI6IjcxNjAzMDA5NzM0OTk1NDg2NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 96585778b105c918465fbfa397dbc2a407e126cc80f160422f5604c10deaa155 |
| hovercard-subject-tag | issue:687209262 |
| 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/18363/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6e5591870b257d88359a2415476151c83347c4ba67a161d6ee8fc44dcc6af64/matplotlib/matplotlib/issues/18363 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6e5591870b257d88359a2415476151c83347c4ba67a161d6ee8fc44dcc6af64/matplotlib/matplotlib/issues/18363 |
| og:image:alt | Bug report Bug summary Setting ha="right" through the prop kwarg breaks AnchoredText placement. Code for reproduction import matplotlib.pyplot as plt from matplotlib.offsetbox import AnchoredText p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | janosh |
| 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