Title: Using of ax.set_ylim() for polar plot leads to "posx and posy should be finite values" error · Issue #11202 · matplotlib/matplotlib · GitHub
Open Graph Title: Using of ax.set_ylim() for polar plot leads to "posx and posy should be finite values" error · Issue #11202 · matplotlib/matplotlib
X Title: Using of ax.set_ylim() for polar plot leads to "posx and posy should be finite values" error · Issue #11202 · matplotlib/matplotlib
Description: Bug report Bug summary I trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get "posx and posy should be finite values" error. I found out that the error is caused by the ax.set_ylim() meth...
Open Graph Description: Bug report Bug summary I trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get "posx and posy should be finite values" error. I found out that the e...
X Description: Bug report Bug summary I trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get "posx and posy should be finite values" error. I found out ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11202
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using of ax.set_ylim() for polar plot leads to \"posx and posy should be finite values\" error","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\r\n**Bug summary**\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\nI trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get \"posx and posy should be finite values\" error. I found out that the error is caused by the `ax.set_ylim()` method. Such way to manage the axis I've got from this [SO question/answer](https://stackoverflow.com/questions/43082637/reverse-radial-axes-of-matplotlib-polar-plot). So this case looks like broken compatibility with older scripts.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure(dpi=120)\r\n\r\nax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)\r\n\r\nax.set_theta_zero_location('N')\r\nax.set_theta_direction(-1) # anti-clockwise\r\n\r\nax.set_ylim(90, -45)\r\nax.set_yticks(np.arange(-45, 90+0.1, 15))\r\n\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n```\r\n ⌘ python3 bug_test.py\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\n/Users/chufyrev/.local/share/virtualenvs/test-TGICRGwR/lib/python3.6/site-packages/numpy/core/_methods.py:29: RuntimeWarning: invali\r\nd value encountered in reduce\r\n return umr_minimum(a, axis, None, out, keepdims)\r\n/Users/chufyrev/.local/share/virtualenvs/test-TGICRGwR/lib/python3.6/site-packages/numpy/core/_methods.py:26: RuntimeWarning: invali\r\nd value encountered in reduce\r\n return umr_maximum(a, axis, None, out, keepdims)\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\nposx and posy should be finite values\r\n```\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: macOS High Sierra 10.13.4\r\n * Matplotlib version: 2.2.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): PyQt5\r\n * Python version: 3.6.5\r\n * Other libraries: numpy@1.14.2\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/ussserrr","@type":"Person","name":"ussserrr"},"datePublished":"2018-05-08T23:16:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/11202/matplotlib/issues/11202"}
| 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:1cae1bae-02ab-8e60-922d-fb5f7bbd82d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D068:19A0FC:EEE615:1467344:6A5202A4 |
| html-safe-nonce | d75180974982ef0e55a0c641ee49c8f67717b67445d8ce2cb590a14f76230ba8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDY4OjE5QTBGQzpFRUU2MTU6MTQ2NzM0NDo2QTUyMDJBNCIsInZpc2l0b3JfaWQiOiIyMjAyODE2NDYwNzgyNDM3MDI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d532283bd07a4a5e1cf2debe3785c9b665a2fea1558928ae2e13b48ba8f7b4ee |
| hovercard-subject-tag | issue:321378480 |
| 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/11202/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e976979ae249e79b2e7ec8b87eabe44d3af0b592117b5c1907820f9e5519bf0b/matplotlib/matplotlib/issues/11202 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e976979ae249e79b2e7ec8b87eabe44d3af0b592117b5c1907820f9e5519bf0b/matplotlib/matplotlib/issues/11202 |
| og:image:alt | Bug report Bug summary I trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get "posx and posy should be finite values" error. I found out that the e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ussserrr |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width