Title: Contours are not removed correctly when using clabel with manual · Issue #9988 · matplotlib/matplotlib · GitHub
Open Graph Title: Contours are not removed correctly when using clabel with manual · Issue #9988 · matplotlib/matplotlib
X Title: Contours are not removed correctly when using clabel with manual · Issue #9988 · matplotlib/matplotlib
Description: Bug report Bug summary Contours created using pyplot.contour are not correctly removed when labelling the contours usingplt.clabel invoked with inline=True and manual positions. Code for reproduction import numpy as np from matplotlib im...
Open Graph Description: Bug report Bug summary Contours created using pyplot.contour are not correctly removed when labelling the contours usingplt.clabel invoked with inline=True and manual positions. Code for reproducti...
X Description: Bug report Bug summary Contours created using pyplot.contour are not correctly removed when labelling the contours usingplt.clabel invoked with inline=True and manual positions. Code for reproducti...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9988
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Contours are not removed correctly when using clabel with manual","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nContours created using `pyplot.contour` are not correctly removed when labelling the contours using`plt.clabel` invoked with `inline=True` and manual positions.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport numpy as np\r\nfrom matplotlib import pyplot as plt\r\n\r\nx = np.linspace(-1, 1)\r\nxx, yy = np.meshgrid(x, x)\r\n\r\nfig, axes = plt.subplots(1, 2, True, True)\r\n\r\nmanual = None\r\nfor ax in axes:\r\n cs = ax.contour(x, x, xx ** 2 + yy ** 2)\r\n clabels = plt.clabel(cs, manual=manual)\r\n manual = [label.get_position() for label in clabels]\r\n```\r\n\r\n**Expected outcome on the left, actual outcome on the right**\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\r\n * Operating system: Linux 273ceb986a84 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 GNU/Linux\r\n * Matplotlib version: 2.1.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): module://ipykernel.pylab.backend_inline\r\n * Python version: 3.6.3\r\n * Jupyter version (if applicable): 4.4.0\r\n * Other libraries: numpy (1.13.3)\r\n\r\nAll libraries were installed using pip in a docker image derived from `python:3`.\r\n","author":{"url":"https://github.com/tillahoffmann","@type":"Person","name":"tillahoffmann"},"datePublished":"2017-12-12T23:02:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/9988/matplotlib/issues/9988"}
| 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:8b8e867a-1a47-8758-f3d2-126a8f0d70eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D486:CCF4F:76483E:9EF7D8:6A51A74F |
| html-safe-nonce | 77fc97fe2c1a92d9a9df37c34e336af2bc3d2a9440927a11dab96c3cf6b20fdb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDg2OkNDRjRGOjc2NDgzRTo5RUY3RDg6NkE1MUE3NEYiLCJ2aXNpdG9yX2lkIjoiMzM5NzE2MzY2MzY5MzU1NTUzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b421fa2a38de8c7174fac2b7dcde3575dde91f8bed19d418973a467c855bbfb0 |
| hovercard-subject-tag | issue:281568091 |
| 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/9988/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de15d3ebb3ce295ea39ab9930f772ab89186c2d520471e5f1947f891c1fc0427/matplotlib/matplotlib/issues/9988 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de15d3ebb3ce295ea39ab9930f772ab89186c2d520471e5f1947f891c1fc0427/matplotlib/matplotlib/issues/9988 |
| og:image:alt | Bug report Bug summary Contours created using pyplot.contour are not correctly removed when labelling the contours usingplt.clabel invoked with inline=True and manual positions. Code for reproducti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tillahoffmann |
| 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