Title: add third angle to view_init() · Issue #14453 · matplotlib/matplotlib · GitHub
Open Graph Title: add third angle to view_init() · Issue #14453 · matplotlib/matplotlib
X Title: add third angle to view_init() · Issue #14453 · matplotlib/matplotlib
Description: Bug report Bug summary mpl_toolkits.mplot3d.axes3d.Axes3D.view_init provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis. A third angle would be required to permit any view...
Open Graph Description: Bug report Bug summary mpl_toolkits.mplot3d.axes3d.Axes3D.view_init provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis. A third an...
X Description: Bug report Bug summary mpl_toolkits.mplot3d.axes3d.Axes3D.view_init provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis. A third an...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14453
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"add third angle to view_init()","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[mpl_toolkits.mplot3d.axes3d.Axes3D.view_init](https://matplotlib.org/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.axes3d.Axes3D.view_init)\r\nprovides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis.\r\nA third angle would be required to permit any view.\r\n\r\nThe issue was reported on [stackoverflow](https://stackoverflow.com/questions/34812843/interchange-location-of-y-and-z-axis-in-3d-matplotlib-plot) 3.5 years ago.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\n\r\nfig = plt.figure()\r\nax = Axes3D(fig)\r\n\r\nax.set_xlabel('x')\r\nax.set_ylabel('y')\r\nax.set_zlabel('z')\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\nNow, however hard you try to rotate the plot interactively or what angles you set in `ax.view_init()`, you will never be able to get the z-axis in a horizontalish position that is required to produce the plot below: \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\nBy rotating interactively or via `ax.view_init()` one should be able to obtain this view below. Unfortunately, this is not possible.\r\n\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: Ubuntu 16.04\r\n * Matplotlib version: 3.1.0, py37h5429711_0 \r\n * Matplotlib backend: Qt5Agg\r\n * Python version: 3.7.3 (conda)\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/baloe","@type":"Person","name":"baloe"},"datePublished":"2019-06-05T09:19:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/14453/matplotlib/issues/14453"}
| 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:54fd97b3-3257-0c76-4488-0ca266ef2292 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A940:20B327:19FC4C7:2266F8B:6A51D3F3 |
| html-safe-nonce | 329e26f72f2a1b542f0cc7f16b2837dc556d384d5d8bf28078c92aff98b81084 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTQwOjIwQjMyNzoxOUZDNEM3OjIyNjZGOEI6NkE1MUQzRjMiLCJ2aXNpdG9yX2lkIjoiNDgwODg2MzMzNDUwMDc4MzA5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cef1253729323205d2347f820393c98d1b3563fd6382cecf8c31ee36b449159e |
| hovercard-subject-tag | issue:452397120 |
| 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/14453/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae1c6729538ad0af4129487e3191637449dcd6975a8e9b0f0d1b54557aa516c2/matplotlib/matplotlib/issues/14453 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae1c6729538ad0af4129487e3191637449dcd6975a8e9b0f0d1b54557aa516c2/matplotlib/matplotlib/issues/14453 |
| og:image:alt | Bug report Bug summary mpl_toolkits.mplot3d.axes3d.Axes3D.view_init provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis. A third an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | baloe |
| 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