Title: Line2D.contains does not take drawstyle into account. · Issue #6447 · matplotlib/matplotlib · GitHub
Open Graph Title: Line2D.contains does not take drawstyle into account. · Issue #6447 · matplotlib/matplotlib
X Title: Line2D.contains does not take drawstyle into account. · Issue #6447 · matplotlib/matplotlib
Description: See joferkington/mpldatacursor#36. Briefly, Line2D.contains currently assumes that points in the line are connected by straight segments, thus ignoring drawstyle. Minimal example (edited from the event handling doc): import numpy as np i...
Open Graph Description: See joferkington/mpldatacursor#36. Briefly, Line2D.contains currently assumes that points in the line are connected by straight segments, thus ignoring drawstyle. Minimal example (edited from the e...
X Description: See joferkington/mpldatacursor#36. Briefly, Line2D.contains currently assumes that points in the line are connected by straight segments, thus ignoring drawstyle. Minimal example (edited from the e...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6447
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Line2D.contains does not take drawstyle into account.","articleBody":"See joferkington/mpldatacursor#36.\nBriefly, `Line2D.contains` currently assumes that points in the line are connected by straight segments, thus ignoring `drawstyle`. Minimal example (edited from the event handling doc):\n\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax = fig.add_subplot(111)\nax.set_title('click on points')\n\nline, = ax.plot(np.random.rand(10), picker=5, drawstyle=\"steps-pre\") # 5 points tolerance\n\ndef onpick(event):\n thisline = event.artist\n xdata = thisline.get_xdata()\n ydata = thisline.get_ydata()\n ind = event.ind\n points = tuple(zip(xdata[ind], ydata[ind]))\n print('onpick points:', points)\n\nfig.canvas.mpl_connect('pick_event', onpick)\n\nplt.show()\n```\n\nClicking on the drawn line does not always trigger an event. Clicking on the not-drawn \"straight\" segments connecting the data points does.\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2016-05-19T05:34:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/6447/matplotlib/issues/6447"}
| 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:4ca07606-74fb-fa7c-a9cd-2df183fa0c83 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5C6:2A0782:F785D9:14D4AD4:6A5334B4 |
| html-safe-nonce | 8bc9581a26a80b751e79c9f0302148f3d03bd9d999c56859971c43562ff33bf5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUM2OjJBMDc4MjpGNzg1RDk6MTRENEFENDo2QTUzMzRCNCIsInZpc2l0b3JfaWQiOiI2NTQxMjc4NTQ2OTkxNzIzNzAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e8e9b97f91a69a7f5b2f20004792cd53bb38fc7a245c7a8a86c790f3857b3ddf |
| hovercard-subject-tag | issue:155657639 |
| 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/6447/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4f985648c073209279e2fc66251a186c95e9d60a27b3c2db81da55b37f4e2822/matplotlib/matplotlib/issues/6447 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4f985648c073209279e2fc66251a186c95e9d60a27b3c2db81da55b37f4e2822/matplotlib/matplotlib/issues/6447 |
| og:image:alt | See joferkington/mpldatacursor#36. Briefly, Line2D.contains currently assumes that points in the line are connected by straight segments, thus ignoring drawstyle. Minimal example (edited from the e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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