Title: [Bug]: set_theta_offset removes grid outline · Issue #26972 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: set_theta_offset removes grid outline · Issue #26972 · matplotlib/matplotlib
X Title: [Bug]: set_theta_offset removes grid outline · Issue #26972 · matplotlib/matplotlib
Description: Bug summary When producing a polar plot, set_theta_offset removes the outer gridlines. Code for reproduction import numpy as np import matplotlib.pyplot as plt fig, (ax1,ax2) = plt.subplots(1,2,subplot_kw=dict(projection='polar')) azis =...
Open Graph Description: Bug summary When producing a polar plot, set_theta_offset removes the outer gridlines. Code for reproduction import numpy as np import matplotlib.pyplot as plt fig, (ax1,ax2) = plt.subplots(1,2,sub...
X Description: Bug summary When producing a polar plot, set_theta_offset removes the outer gridlines. Code for reproduction import numpy as np import matplotlib.pyplot as plt fig, (ax1,ax2) = plt.subplots(1,2,sub...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26972
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: set_theta_offset removes grid outline","articleBody":"### Bug summary\r\n\r\nWhen producing a polar plot, ``set_theta_offset`` removes the outer gridlines.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfig, (ax1,ax2) = plt.subplots(1,2,subplot_kw=dict(projection='polar'))\r\n\r\nazis = np.radians(np.linspace(0,360,72)); r = np.linspace(0, 250, 250)\r\ndats = np.random.rand(250,72)\r\nX,Y=np.meshgrid(azis,r)\r\n\r\nfor ax in [ax1,ax2]:\r\n ax.contourf(X,Y,dats,cmap=\"RdYlBu\")\r\n\r\nax2.set_theta_offset(1.570796327)\r\nplt.subplots_adjust(wspace=0.5)\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nFirst axis has no \"set_theta_offset\", which means the plot starts at 90. Second axis has \"set_theta_offset\", which rotates the plot to start at 0, but it removes the black outline. \r\n\r\n\r\n\r\n\r\n### Expected outcome\r\n\r\nExpect ax2 above to have a black circular outline as in ax1.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nWindows\r\n\r\n### Matplotlib Version\r\n\r\n3.7.1\r\n\r\n### Matplotlib Backend\r\n\r\nmodule://matplotlib_inline.backend_inline\r\n\r\n### Python version\r\n\r\n3.11.3\r\n\r\n### Jupyter version\r\n\r\n6.5.4\r\n\r\n### Installation\r\n\r\nconda","author":{"url":"https://github.com/am-thyst","@type":"Person","name":"am-thyst"},"datePublished":"2023-10-02T13:10:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/26972/matplotlib/issues/26972"}
| 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:d09dc7e6-0a6a-2f0e-cc15-542c0abe63f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C12C:16EEE2:467378:5EB462:6A51C5A6 |
| html-safe-nonce | 8baddb1025776816ac1e6b13b1a23b9f1984831573ca7c822848a41166643038 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTJDOjE2RUVFMjo0NjczNzg6NUVCNDYyOjZBNTFDNUE2IiwidmlzaXRvcl9pZCI6IjM1NTgwNzQ4OTY5MDYwNDQ4MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 43d70822fb9aa2a9a7ea1e557d9d126aa582ed731930aeb2e45c47041b067496 |
| hovercard-subject-tag | issue:1921893214 |
| 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/26972/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52ea977280bbdf74fd54e1b148cd20591044656dbd1f2c6c552c5094f5637004/matplotlib/matplotlib/issues/26972 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52ea977280bbdf74fd54e1b148cd20591044656dbd1f2c6c552c5094f5637004/matplotlib/matplotlib/issues/26972 |
| og:image:alt | Bug summary When producing a polar plot, set_theta_offset removes the outer gridlines. Code for reproduction import numpy as np import matplotlib.pyplot as plt fig, (ax1,ax2) = plt.subplots(1,2,sub... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | am-thyst |
| 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