Title: [Bug]: Removing spines in polar plot causes distortion of the plot · Issue #30164 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Removing spines in polar plot causes distortion of the plot · Issue #30164 · matplotlib/matplotlib
X Title: [Bug]: Removing spines in polar plot causes distortion of the plot · Issue #30164 · matplotlib/matplotlib
Description: Bug summary I would like to create a polar plot without the grid lines. When using ax.set_xticks([]) (and/or yticks/rticks) the plot appears distorted. Code for reproduction import numpy as np import matplotlib.pyplot as plt D = np.array...
Open Graph Description: Bug summary I would like to create a polar plot without the grid lines. When using ax.set_xticks([]) (and/or yticks/rticks) the plot appears distorted. Code for reproduction import numpy as np impo...
X Description: Bug summary I would like to create a polar plot without the grid lines. When using ax.set_xticks([]) (and/or yticks/rticks) the plot appears distorted. Code for reproduction import numpy as np impo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30164
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Removing spines in polar plot causes distortion of the plot","articleBody":"### Bug summary\n\nI would like to create a polar plot without the grid lines. When using `ax.set_xticks([])` (and/or yticks/rticks) the plot appears distorted. \n\n\n\n### Code for reproduction\n\n```Python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nD = np.array([[2,.3],[.3,2.5]])\n\n# creating an ellipse)\nlam, vec = np.linalg.eigh(D)\ntheta = np.linspace(-np.pi,np.pi,1001)\nxy = np.stack((lam[0]*np.cos(theta), lam[1]*np.sin(theta)), axis=0)\nxy = vec.T@xy\nradii = np.sqrt(np.sum(xy**2, axis=0))\nthetas = np.arctan2(-xy[1],xy[0])\n\nplt.figure()\n# with ticks\nax1 = plt.subplot(121,projection='polar')\nax1.plot(thetas, radii)\n# without ticks\nax2 = plt.subplot(122, projection='polar')\nax2.plot(thetas, radii)\nax2.set_yticks([])\nax2.set_xticks([])\n\nplt.show()\n```\n\n### Actual outcome\n\n\u003cimg width=\"587\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b6cb74b9-71ec-43c0-bc20-66c21bf2ff02\" /\u003e\n\n### Expected outcome\n\n\u003cimg width=\"380\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ac204878-2602-46b4-82eb-3c9f43bb703a\" /\u003e\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nOS/X and Linux\n\n### Matplotlib Version\n\n3.10.0\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\n3.10\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/sjbabdi","@type":"Person","name":"sjbabdi"},"datePublished":"2025-06-11T12:56:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/30164/matplotlib/issues/30164"}
| 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:b48b6b51-b025-2bb0-7ffb-2ea45358ae05 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB40:1BC2B5:628AE9:86005F:6A51EC18 |
| html-safe-nonce | 6cd91dd0081346a200d4a8cb536a540481ff03c4f3897c307b41014807e82c81 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjQwOjFCQzJCNTo2MjhBRTk6ODYwMDVGOjZBNTFFQzE4IiwidmlzaXRvcl9pZCI6Ijc4ODIxMTE1NzUyNDI0MzU2MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3418ce27dccc391b68606b8048df60cef651f82d4d4530e1aac99e380b04d315 |
| hovercard-subject-tag | issue:3136732046 |
| 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/30164/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c4197c2bb2e65c2689999bab16a1e7b0c35afef428babbf6d4848af5580dcad5/matplotlib/matplotlib/issues/30164 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c4197c2bb2e65c2689999bab16a1e7b0c35afef428babbf6d4848af5580dcad5/matplotlib/matplotlib/issues/30164 |
| og:image:alt | Bug summary I would like to create a polar plot without the grid lines. When using ax.set_xticks([]) (and/or yticks/rticks) the plot appears distorted. Code for reproduction import numpy as np impo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sjbabdi |
| 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