Title: [Bug]: ContourLabeler.clabel with manual != False breaks unconnected contours · Issue #27062 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: ContourLabeler.clabel with manual != False breaks unconnected contours · Issue #27062 · matplotlib/matplotlib
X Title: [Bug]: ContourLabeler.clabel with manual != False breaks unconnected contours · Issue #27062 · matplotlib/matplotlib
Description: Bug summary When adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejoined seemingly arbitrarily. Code for rep...
Open Graph Description: Bug summary When adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejo...
X Description: Bug summary When adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27062
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: ContourLabeler.clabel with manual != False breaks unconnected contours","articleBody":"### Bug summary\r\n\r\nWhen adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejoined seemingly arbitrarily.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nfig, ax = plt.subplots()\r\nx, y = np.mgrid[-1:1:21j, -1:1:21j]\r\n\r\ncs = ax.contour(x, y, 1/np.sqrt(0.01+(x+0.3)**2+y**2) + 1/np.sqrt(0.01+(x-0.3)**2+y**2), levels=[7])\r\ncs.clabel(manual=[(0.2, 0.1)])\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\nAs it looked in matplotlib 3.7.3:\r\n\r\n\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\n_No response_\r\n\r\n### Matplotlib Version\r\n\r\n3.8.0\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\n_No response_\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nconda","author":{"url":"https://github.com/rho-novatron","@type":"Person","name":"rho-novatron"},"datePublished":"2023-10-11T16:37:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/27062/matplotlib/issues/27062"}
| 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:99fbb6d9-ed7a-ee74-fea1-63e6d9ae39a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC3A:1A8743:17CC7B8:1FE6CE8:6A543FEA |
| html-safe-nonce | 05acbcc1f72178f74144104454cb75ff54ab00afb24224611c69ea9c96c2085b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzNBOjFBODc0MzoxN0NDN0I4OjFGRTZDRTg6NkE1NDNGRUEiLCJ2aXNpdG9yX2lkIjoiMjA2NjI3NjEyMTg0MzA4OTM4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | add982fa3f94332d6ed46d0073a3f43cd893648fd98d35d4f5da7f058fa3acf4 |
| hovercard-subject-tag | issue:1938230205 |
| 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/27062/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dee6dd9889142112d58c82ba7244d0029eb35070051d3f5094647dc9865ad9b2/matplotlib/matplotlib/issues/27062 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dee6dd9889142112d58c82ba7244d0029eb35070051d3f5094647dc9865ad9b2/matplotlib/matplotlib/issues/27062 |
| og:image:alt | Bug summary When adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rho-novatron |
| 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