Title: [ENH]: Provide `axis('equal')` for `Axes3D`. · Issue #22570 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: Provide `axis('equal')` for `Axes3D`. · Issue #22570 · matplotlib/matplotlib
X Title: [ENH]: Provide `axis('equal')` for `Axes3D`. · Issue #22570 · matplotlib/matplotlib
Description: Bug summary In the example below, I wish to observe a unitary 3D cube in its diagonal axis (1, 1, 1). azimut and elevation angle should be both 45°, normally. Why do I need to set elevation = 28° ???? Thanks, Patrick Code for reproductio...
Open Graph Description: Bug summary In the example below, I wish to observe a unitary 3D cube in its diagonal axis (1, 1, 1). azimut and elevation angle should be both 45°, normally. Why do I need to set elevation = 28° ?...
X Description: Bug summary In the example below, I wish to observe a unitary 3D cube in its diagonal axis (1, 1, 1). azimut and elevation angle should be both 45°, normally. Why do I need to set elevation = 28° ?...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22570
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: Provide `axis('equal')` for `Axes3D`.","articleBody":"### Bug summary\n\nIn the example below, I wish to observe a unitary 3D cube in its diagonal axis (1, 1, 1). \r\nazimut and elevation angle should be both 45°, normally. \r\nWhy do I need to set elevation = 28° ????\r\nThanks,\r\nPatrick\n\n### Code for reproduction\n\n```python\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots(1, 3, figsize=(15, 5),\r\n subplot_kw=dict(projection=\"3d\",\r\n proj_type='ortho'))\r\n\r\nax[0].voxels(np.ones((1, 1, 1)), facecolors=[0, 0, 0, 0], edgecolors='k')\r\nax[0].quiver(0, 0, 0, 1, 1, 1, color='r', linewidth=5)\r\n\r\nax[1].set_title(\"azim=45°, elev=45°\")\r\nax[1].voxels(np.ones((1, 1, 1)), facecolors=[0, 0, 0, 0], edgecolors='k')\r\nax[1].view_init(azim=45, elev=45)\r\nax[1].quiver(0, 0, 0, 1, 1, 1, color='r', linewidth=5)\r\n\r\nax[2].set_title(\"azim=45°, elev=28°\")\r\nax[2].voxels(np.ones((1, 1, 1)), facecolors=[0, 0, 0, 0], edgecolors='k')\r\nax[2].view_init(azim=45, elev=28)\r\nax[2].quiver(0, 0, 0, 1, 1, 1, color='r', linewidth=5)\r\n\r\nplt.show()\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nview_init(azim=45, elev=45) and not view_init(azim=45, elev=28) to have the expected 3D representation\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nWindows\n\n### Matplotlib Version\n\n3.4.2\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\nPython 3.7.7\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/patquem","@type":"Person","name":"patquem"},"datePublished":"2022-02-28T10:05:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/22570/matplotlib/issues/22570"}
| 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:9bb3fdb3-63f3-af72-3cd7-b432c0c21028 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87CA:3958B5:F5012:157C10:6A526978 |
| html-safe-nonce | d1da651d4ca8931af31f09897cb89d4fb9c9ce78d5ce143358db54b207afbdf5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0NBOjM5NThCNTpGNTAxMjoxNTdDMTA6NkE1MjY5NzgiLCJ2aXNpdG9yX2lkIjoiOTExNjk3ODE0ODE2NDEzNTI4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a3186a0ff3b2e1f6faf4f4939738e3e167584561486682473a20d29e72249c12 |
| hovercard-subject-tag | issue:1153891023 |
| 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/22570/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4d9a526325ddcb7ce56f74f5095511cad267b741e37b9b1e88f76277e4b6164d/matplotlib/matplotlib/issues/22570 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4d9a526325ddcb7ce56f74f5095511cad267b741e37b9b1e88f76277e4b6164d/matplotlib/matplotlib/issues/22570 |
| og:image:alt | Bug summary In the example below, I wish to observe a unitary 3D cube in its diagonal axis (1, 1, 1). azimut and elevation angle should be both 45°, normally. Why do I need to set elevation = 28° ?... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | patquem |
| 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