Title: Adding twin axes into polar coordinate system · Issue #12506 · matplotlib/matplotlib · GitHub
Open Graph Title: Adding twin axes into polar coordinate system · Issue #12506 · matplotlib/matplotlib
X Title: Adding twin axes into polar coordinate system · Issue #12506 · matplotlib/matplotlib
Description: Bug report Adding twin x Axes into polar coordinate system seems does not work Bug summary Code for reproduction import numpy as np from matplotlib.ticker import FormatStrFormatter import matplotlib.pyplot as plt labels = np.array(['E', ...
Open Graph Description: Bug report Adding twin x Axes into polar coordinate system seems does not work Bug summary Code for reproduction import numpy as np from matplotlib.ticker import FormatStrFormatter import matplotli...
X Description: Bug report Adding twin x Axes into polar coordinate system seems does not work Bug summary Code for reproduction import numpy as np from matplotlib.ticker import FormatStrFormatter import matplotli...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12506
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Adding twin axes into polar coordinate system","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\nAdding twin x Axes into polar coordinate system seems does not work\r\n**Bug summary**\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\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\nfrom matplotlib.ticker import FormatStrFormatter\r\nimport matplotlib.pyplot as plt\r\n\r\n\r\nlabels = np.array(['E', '', 'N', '', 'W', '', 'S', ''])\r\ndataLength = 8\r\ndata = np.array([3.23, 3.23, 9.68, 3.23, 12.90, 32.26, 6.45, 29.03])\r\nangles = np.linspace(0, 2*np.pi, dataLength, endpoint=False)\r\n\r\nwidth = np.pi/8*np.array([1]*8)\r\n\r\nax = plt.subplot(111, projection='polar')\r\nax2 = ax.twinx()\r\n\r\nbars = ax.bar(angles, data, alpha=0.4, label=labels, width=width, bottom=0.0, color=\"red\")\r\n\r\ndata = np.array([10.3, 2.23, 15.68, 13.23, 12.90, 12.26, 8.45, 29.03])\r\ndata = np.concatenate((data, [data[0]]))\r\nangles = np.concatenate((angles, [angles[0]]))\r\n\r\nplots = ax.plot(angles, data, alpha=0.7, linestyle=\"--\", linewidth=1, color=\"blue\")\r\nplt.fill(angles, data, facecolor='blue', alpha=0.25)\r\n\r\ngridLines, gridLabel = ax.set_thetagrids(angles * 180/np.pi, labels, fontproperties=\"DejaVu Sans\")\r\n\r\nax.yaxis.set_major_formatter(FormatStrFormatter('%d%%'))\r\n\r\nplt.yticks(fontsize=8)\r\nplt.xticks(fontsize=15)\r\n\r\n[label.set_fontweight('bold') for label in ax.get_xticklabels()]\r\n[label.set_color('blue') for label in ax.get_yticklabels()]\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\r\n```\r\n\r\n**Expected outcome**\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:\r\n * Matplotlib version: \r\n * Matplotlib backend (`print(matplotlib.get_backend())`):\r\n * Python version:\r\n * Jupyter version (if applicable):\r\n * Other libraries: \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/519165198","@type":"Person","name":"519165198"},"datePublished":"2018-10-12T16:12:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/12506/matplotlib/issues/12506"}
| 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:5af4ad64-9295-eb23-12b3-76d3391a10a3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FCC:399A66:241AB2:318AEE:6A536D55 |
| html-safe-nonce | 6b3dfee193e156d1ca034d163dea3efaf00d14111ea1c7dca5451cef25883d85 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkNDOjM5OUE2NjoyNDFBQjI6MzE4QUVFOjZBNTM2RDU1IiwidmlzaXRvcl9pZCI6Ijc4MTkyODQwMDc2NTc2MzEwNjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c22e892fa9673c1ee12a5e98320334b4b38d12d506bb1d9e88063f32d494fc96 |
| hovercard-subject-tag | issue:369617324 |
| 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/12506/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fab7a5e00972370d2d3b053606c9f31ba62a19c2864ba5981dc54f2c2cdae8b0/matplotlib/matplotlib/issues/12506 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fab7a5e00972370d2d3b053606c9f31ba62a19c2864ba5981dc54f2c2cdae8b0/matplotlib/matplotlib/issues/12506 |
| og:image:alt | Bug report Adding twin x Axes into polar coordinate system seems does not work Bug summary Code for reproduction import numpy as np from matplotlib.ticker import FormatStrFormatter import matplotli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 519165198 |
| 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