Title: inset_locator.mark_inset() misplaces box connectors · Issue #17711 · matplotlib/matplotlib · GitHub
Open Graph Title: inset_locator.mark_inset() misplaces box connectors · Issue #17711 · matplotlib/matplotlib
X Title: inset_locator.mark_inset() misplaces box connectors · Issue #17711 · matplotlib/matplotlib
Description: Bug report Bug summary inset_locator.mark_inset() sometimes misplaces the box connector lines if x/y limits on the parent Axes have not been explicitly set. Updating the plot (e.g. by saving the figure) seems to fix it. Code for reproduc...
Open Graph Description: Bug report Bug summary inset_locator.mark_inset() sometimes misplaces the box connector lines if x/y limits on the parent Axes have not been explicitly set. Updating the plot (e.g. by saving the fi...
X Description: Bug report Bug summary inset_locator.mark_inset() sometimes misplaces the box connector lines if x/y limits on the parent Axes have not been explicitly set. Updating the plot (e.g. by saving the fi...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17711
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"inset_locator.mark_inset() misplaces box connectors","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\n`inset_locator.mark_inset()` sometimes misplaces the box connector lines if x/y limits on the parent `Axes` have not been explicitly set. Updating the plot (e.g. by saving the figure) seems to fix it.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport mpl_toolkits.axes_grid1.inset_locator as miloc\r\n\r\nfig, (inset, full) = plt.subplots(ncols=2)\r\n\r\n# swapping the axes makes the example work\r\n# full, inset = inset, full\r\n\r\nfull.plot([-1, 0], [-1, 0])\r\ninset.set_xlim(-0.6, -0.4)\r\ninset.set_ylim(-0.6, -0.4)\r\n\r\n# workaround\r\n# full.set_xlim(-1.0, 0.0)\r\n# full.set_ylim(-1.0, 0.0)\r\n\r\nmiloc.mark_inset(full, inset, 1, 4)\r\nfig.savefig('Bug.png')\r\n# saving the figure a second time produces the expected result\r\nfig.savefig('NoBug.png')\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\n\r\n\r\nThis issue was not present in version 3.0.2.\r\n\r\n**Matplotlib version**\r\n\r\n * Operating system: Fedora and Debian\r\n * Matplotlib version: 3.2.1 and 3.2.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): `Qt5Agg` and `agg`\r\n * Python version: 3.8\r\n * Jupyter version (if applicable): N/A\r\n * Other libraries: N/A\r\n\r\nInstalled via pip on Debian and both pip and dnf on Fedora.","author":{"url":"https://github.com/joreiff","@type":"Person","name":"joreiff"},"datePublished":"2020-06-22T09:06:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/17711/matplotlib/issues/17711"}
| 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:18730f9f-43ef-a9bf-fa4a-b51ccf78bb09 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D88:25F3E7:3562D5:4A95B6:6A5373AC |
| html-safe-nonce | 305d9c1564896332497f791354b48a9d01e688f4aa037a1e0e10116563acd19f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDg4OjI1RjNFNzozNTYyRDU6NEE5NUI2OjZBNTM3M0FDIiwidmlzaXRvcl9pZCI6IjE3OTQ1MjM5MzMxODMyNzU5NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8b9ef9b1b615bea292fe29d6bd07b7923855043ef057fd831c4b4f8b146a92fd |
| hovercard-subject-tag | issue:642892727 |
| 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/17711/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4611a1422a13fbf9def30ec9475bd3e8d161f985e9013a22b12c8a7c1f1cc4a/matplotlib/matplotlib/issues/17711 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4611a1422a13fbf9def30ec9475bd3e8d161f985e9013a22b12c8a7c1f1cc4a/matplotlib/matplotlib/issues/17711 |
| og:image:alt | Bug report Bug summary inset_locator.mark_inset() sometimes misplaces the box connector lines if x/y limits on the parent Axes have not been explicitly set. Updating the plot (e.g. by saving the fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joreiff |
| 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