Title: Patches cannot be picked when y-axis has logarithmic scaling · Issue #8979 · matplotlib/matplotlib · GitHub
Open Graph Title: Patches cannot be picked when y-axis has logarithmic scaling · Issue #8979 · matplotlib/matplotlib
X Title: Patches cannot be picked when y-axis has logarithmic scaling · Issue #8979 · matplotlib/matplotlib
Description: Bug report Bug summary When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour. Text seems to work correctly, but FancyArrowPatch cannot be picked at all and the pick area for circles is very far of...
Open Graph Description: Bug report Bug summary When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour. Text seems to work correctly, but FancyArrowPatch cannot be picked at all and ...
X Description: Bug report Bug summary When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour. Text seems to work correctly, but FancyArrowPatch cannot be picked at all and ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8979
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Patches cannot be picked when y-axis has logarithmic scaling","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n**Bug summary**\r\nWhen plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour.\r\n\r\nText seems to work correctly, but FancyArrowPatch cannot be picked at all and the pick area for circles is very far off to the left.\r\n\r\n**Code for reproduction**\r\nMake sure to uncomment the scaling line if you want to see the bug!\r\n```python\r\nfrom __future__ import print_function\r\n\r\nfrom matplotlib import pyplot as plt\r\nfrom matplotlib import patches\r\nfrom matplotlib import text\r\n\r\n\r\ndef pick_event(event):\r\n print(\"PICK\", event.artist)\r\n\r\n\r\ndef main():\r\n fig = plt.figure()\r\n axes = fig.add_subplot(111)\r\n\r\n # Uncommenting this makes picking break for the patches.\r\n # The circle will have a wierd selection box to the left side of the plot,\r\n # and the line will not be selectable at all.\r\n # axes.set_yscale('log')\r\n axes.set_xlim((0, 5))\r\n axes.set_ylim((1e-1, 10))\r\n\r\n # Add an arrow.\r\n arrow = patches.FancyArrowPatch(\r\n (3, 2),\r\n (4, 3),\r\n )\r\n arrow.set_picker(4)\r\n axes.add_patch(arrow)\r\n\r\n # Add a circle.\r\n circle = patches.Circle(xy=(1.90, 0.5), radius=0.1)\r\n circle.set_picker(4)\r\n axes.add_patch(circle)\r\n\r\n # Add some text.\r\n text_ = text.Text(1, 1, 'text')\r\n text_.set_picker(4)\r\n axes.add_artist(text_)\r\n\r\n # Connect the pick event and show the plot.\r\n fig.canvas.mpl_connect('pick_event', pick_event)\r\n plt.show()\r\n\r\n\r\nif __name__ == '__main__':\r\n main()\r\n```\r\n\r\n**Actual outcome**\r\nOnly the text is properly pickable.\r\n\r\n**Expected outcome**\r\nEverything should be properly pickable.\r\n\r\n**Matplotlib version**\r\n * Operating System:\r\n```\r\n$ lsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID:\tUbuntu\r\nDescription:\tUbuntu 16.04.2 LTS\r\nRelease:\t16.04\r\nCodename:\txenial\r\n```\r\n * Matplotlib Version: \r\n```\r\n$ python -c \"import matplotlib; print matplotlib.__version__\"\r\n2.0.2\r\n```\r\n * Python Version:\r\n```\r\n$ python --version\r\nPython 2.7.12\r\n```\r\n\r\nInstalled matplotlib via pip:\r\n```\r\n(virtenv) 13:49:32-user@computer:~/Desktop$ pip install matplotlib\r\nCollecting matplotlib\r\n Downloading matplotlib-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl (14.5MB)\r\n 100% |████████████████████████████████| 14.5MB 98kB/s \r\nCollecting numpy\u003e=1.7.1 (from matplotlib)\r\n Downloading numpy-1.13.1-cp27-cp27mu-manylinux1_x86_64.whl (16.6MB)\r\n 100% |████████████████████████████████| 16.6MB 115kB/s \r\nCollecting cycler\u003e=0.10 (from matplotlib)\r\n Using cached cycler-0.10.0-py2.py3-none-any.whl\r\nCollecting python-dateutil (from matplotlib)\r\n Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)\r\n 100% |████████████████████████████████| 194kB 8.2MB/s \r\nCollecting functools32 (from matplotlib)\r\nCollecting six\u003e=1.10 (from matplotlib)\r\n Using cached six-1.10.0-py2.py3-none-any.whl\r\nCollecting pytz (from matplotlib)\r\n Using cached pytz-2017.2-py2.py3-none-any.whl\r\nCollecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,\u003e=1.5.6 (from matplotlib)\r\n Using cached pyparsing-2.2.0-py2.py3-none-any.whl\r\nCollecting subprocess32 (from matplotlib)\r\nInstalling collected packages: numpy, six, cycler, python-dateutil, functools32, pytz, pyparsing, subprocess32, matplotlib\r\nSuccessfully installed cycler-0.10.0 functools32-3.2.3-2 matplotlib-2.0.2 numpy-1.13.1 pyparsing-2.2.0 python-dateutil-2.6.1 pytz-2017.2 six-1.10.0 subprocess32-3.2.7\r\n```\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/lejar","@type":"Person","name":"lejar"},"datePublished":"2017-08-02T11:55:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/8979/matplotlib/issues/8979"}
| 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:cac627e5-3aab-5381-05b5-befc632ad04e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEAC:18AAA8:280F040:36CB154:6A5449A6 |
| html-safe-nonce | b8efd129c6ebaa584694b99a30b7e344aa4c0f533235ad7d7bef15db9bd7092b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUFDOjE4QUFBODoyODBGMDQwOjM2Q0IxNTQ6NkE1NDQ5QTYiLCJ2aXNpdG9yX2lkIjoiNzc5NTMzNjUxOTg1MDY3NDU5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5682f939225d0b2726c05f7fdc9818b9fc8557c15228628269ee59eb509c43d1 |
| hovercard-subject-tag | issue:247363490 |
| 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/8979/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad2f42f746f2fdb841e0ca1bdf0f2fe7d4591bd4326551326a5bb22deb3c5547/matplotlib/matplotlib/issues/8979 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad2f42f746f2fdb841e0ca1bdf0f2fe7d4591bd4326551326a5bb22deb3c5547/matplotlib/matplotlib/issues/8979 |
| og:image:alt | Bug report Bug summary When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour. Text seems to work correctly, but FancyArrowPatch cannot be picked at all and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lejar |
| 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