Title: Issue rendering polar plot (agg backend?) with rorigin set · Issue #17418 · matplotlib/matplotlib · GitHub
Open Graph Title: Issue rendering polar plot (agg backend?) with rorigin set · Issue #17418 · matplotlib/matplotlib
X Title: Issue rendering polar plot (agg backend?) with rorigin set · Issue #17418 · matplotlib/matplotlib
Description: Bug report When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and saving it with the UI as a png works as...
Open Graph Description: Bug report When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and...
X Description: Bug report When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working int...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17418
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue rendering polar plot (agg backend?) with rorigin set","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\nWhen saving a png of a polar plot with the r-origin set \"by hand,\" saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and saving it with the UI as a png works as expected.\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nfrom matplotlib.gridspec import GridSpec\r\n\r\nnbins = 50\r\ndata = np.random.randint(0, 42, nbins)\r\n\r\nfig = plt.figure()\r\n\r\nax_g = fig.add_subplot(polar=True, facecolor=\"none\")\r\ntheta = np.array(\r\n [np.pi/2-i*2*np.pi/len(data) for i in range(len(data))])\r\nlines = ax_g.plot(theta, data)\r\n\r\nax_g.set_rorigin(-78) # Replacing this with ax_g.set_rmin works as expected, so the problem comes from this line.\r\n\r\nfig.savefig(\"bug.png\")\r\nfig.savefig(\"bug.pdf\")\r\n```\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\n[bug.pdf](https://github.com/matplotlib/matplotlib/files/4634337/bug.pdf)\r\n\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\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: Ubuntu\r\n * Matplotlib version: 3.2.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): TkAgg (tried with Agg, and other backends)\r\n * Python version: 3.8.2\r\n * Jupyter version (if applicable): NA\r\n * Other libraries: NA\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/NelleV","@type":"Person","name":"NelleV"},"datePublished":"2020-05-15T12:28:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/17418/matplotlib/issues/17418"}
| 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:c9adf3d6-96c1-0ee0-8835-339109de282d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4A2:230914:FB00AA:1587475:6A53BA48 |
| html-safe-nonce | 968034072900c6337245942ee2d68a26b8b0ec035158af2aab5048c73225701c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEEyOjIzMDkxNDpGQjAwQUE6MTU4NzQ3NTo2QTUzQkE0OCIsInZpc2l0b3JfaWQiOiIyOTQwOTAzNDQyMzg5MTIxNjA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 70f9d5ae7cd0f9e9394d395aaf5fd06800a7d6f66658e64f11adfb86585315d2 |
| hovercard-subject-tag | issue:618931600 |
| 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/17418/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7aecf8f162777d21f9b5239d44e33c55487fc77f7a9c7d9aeb1036dcb9f302e7/matplotlib/matplotlib/issues/17418 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7aecf8f162777d21f9b5239d44e33c55487fc77f7a9c7d9aeb1036dcb9f302e7/matplotlib/matplotlib/issues/17418 |
| og:image:alt | Bug report When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NelleV |
| 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