Title: [Bug]: plot3d depth test is off · Issue #24767 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: plot3d depth test is off · Issue #24767 · matplotlib/matplotlib
X Title: [Bug]: plot3d depth test is off · Issue #24767 · matplotlib/matplotlib
Description: Bug summary The depth testing of points depends only on their coordinates and doesn't take into account the camera angle. mpl-3d-depth.mp4 Code for reproduction import matplotlib.pyplot as plt colors = [ 0x010101, 0x050405, 0x080809, 0x0...
Open Graph Description: Bug summary The depth testing of points depends only on their coordinates and doesn't take into account the camera angle. mpl-3d-depth.mp4 Code for reproduction import matplotlib.pyplot as plt colo...
X Description: Bug summary The depth testing of points depends only on their coordinates and doesn't take into account the camera angle. mpl-3d-depth.mp4 Code for reproduction import matplotlib.pyplot as plt ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/24767
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: plot3d depth test is off","articleBody":"### Bug summary\n\nThe depth testing of points depends only on their coordinates and doesn't take into account the camera angle.\r\n\r\nhttps://user-images.githubusercontent.com/34467/208313787-af146250-9824-45b6-8817-13c089e3f0f4.mp4\r\n\r\n\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\ncolors = [\r\n 0x010101, 0x050405, 0x080809, 0x0d0b0c, 0x0d101e, 0x110e0f, 0x11192f, 0x151213,\r\n 0x161419, 0x171514, 0x18181a, 0x182133, 0x1d191b, 0x1e2741, 0x1f1c1d, 0x214e92,\r\n 0x221e11, 0x222121, 0x23539c, 0x264b76, 0x285ba6, 0x2860ae, 0x2866b3, 0x29272c,\r\n 0x293551, 0x2a2322, 0x2a6bbb, 0x2b71c0, 0x2b75c3, 0x2c2d2f, 0x2c3544, 0x2d2b23,\r\n 0x2d63b0, 0x2e68b4, 0x2f79c8, 0x306ab8, 0x306cbd, 0x3070bf, 0x307ecc, 0x3175c2,\r\n 0x3183d0, 0x323031, 0x362e2e, 0x363536, 0x366fbb, 0x3683d0, 0x3773c0, 0x3777c3,\r\n 0x3779c8, 0x3880ca, 0x3889d4, 0x3b2920, 0x3b3630, 0x3b3a3c, 0x3b3c43, 0x3b90d8,\r\n 0x3c2018, 0x3c2f1f, 0x3c3938, 0x3e7dc3, 0x3e7fc8, 0x3e8cd4, 0x3f84cc, 0x3f86d1,\r\n 0x403536, 0x412e2d, 0x4190d7, 0x4194d9, 0x42371f, 0x423828, 0x438fd2, 0x4398db,\r\n 0x444242, 0x463e41, 0x464648, 0x473c3c, 0x485064, 0x488ad2, 0x4898dc, 0x4989cb,\r\n 0x4a3930, 0x4a4b50, 0x4a93d7, 0x4b3c37, 0x4b8ac6, 0x4b9ede, 0x4c4f59, 0x4e452c,\r\n 0x4e91cf, 0x4f453c, 0x504537, 0x505055, 0x534842, 0x534c49, 0x535b69, 0x5398d8,\r\n 0x53a2e0, 0x545050, 0x559ddd, 0x566674, 0x5681ab, 0x57a7e1, 0x585959, 0x58a0d8,\r\n 0x58a3dd, 0x5995ca, 0x5999d1, 0x5aa6dd, 0x5bace1, 0x5daee4, 0x633f32, 0x63524f,\r\n 0x644543, 0x645954, 0x64605e, 0x646263, 0x64656b, 0x64b1e5, 0x655241, 0x657487,\r\n 0x659cc9, 0x65a4d2, 0x65aadb, 0x65ace2, 0x6790b3, 0x686a6e, 0x695f53, 0x6a6e73,\r\n 0x6a96bd, 0x6ab5e6, 0x6b7479, 0x6b7e8a, 0x6db1e3, 0x6db5e2, 0x6e86a1, 0x6ea4cb,\r\n 0x70acd8, 0x73aad2, 0x747477, 0x747f89, 0x74b0da, 0x75b8e6, 0x76574a, 0x774f3a,\r\n 0x775b55, 0x776a66, 0x787b7c, 0x78b8e1, 0x7a6955, 0x7a736c, 0x7e8790, 0x7ea6c6,\r\n 0x7f97ad, 0x7fb5da, 0x808285, 0x80bbe2, 0x817e7c, 0x81afd0, 0x84bfe2, 0x87888a,\r\n 0x88725f, 0x88b7d8, 0x897353, 0x8a7a6c, 0x8abedc, 0x8b959e, 0x8d8379, 0x8e5134,\r\n 0x8e8b8b, 0x8e9396, 0x90adc6, 0x90b3ce, 0x91a0aa, 0x91bdd9, 0x92604f, 0x92795f,\r\n 0x929291, 0x92b9d1, 0x94806c, 0x95bdd7, 0x96938b, 0x989a9d, 0x999897, 0x9a8779,\r\n 0x9b9283, 0x9cbfd8, 0x9d9174, 0x9da4aa, 0x9e9f9f, 0xa1846b, 0xa4a5a7, 0xa57c60,\r\n 0xa5abae, 0xa6b9c6, 0xa6bdc9, 0xa7a29d, 0xa99e8f, 0xa9b6c0, 0xaa946f, 0xaaaaaa,\r\n 0xac946b, 0xac9773, 0xacafb1, 0xacb2ba, 0xad9a77, 0xad9c84, 0xaf5f25, 0xafaa9e,\r\n 0xb09e7d, 0xb0b1b1, 0xb3b8bb, 0xb4bec3, 0xb5b4b2, 0xb77750, 0xb7a68d, 0xb8b8b4,\r\n 0xb9a985, 0xbaa246, 0xbbbbbc, 0xbbc4c9, 0xbcaf8f, 0xbcb4ab, 0xbcc1c1, 0xbd732d,\r\n 0xbeceda, 0xc1b29c, 0xc1c3c3, 0xc2b9ac, 0xc4beb0, 0xc5c5c4, 0xc6cac8, 0xc6ccce,\r\n 0xc7b590, 0xc8bc9d, 0xcbc5bf, 0xcec3ad, 0xceccc6, 0xcfd0cf, 0xd1c09d, 0xd3cec4,\r\n 0xd3d2d1, 0xd5d5d6, 0xd6c7ac, 0xd6d0c7, 0xd8d7cf, 0xd9dbda, 0xdbcfb1, 0xdcd1c2,\r\n 0xe1d8c8, 0xe2e0db, 0xe5e5e4, 0xe8dfcb, 0xeeece9, 0xf4f5f6, 0xfdfcfb,\r\n]\r\n\r\nax = plt.figure().add_subplot(projection=\"3d\")\r\nfor c in colors:\r\n r, g, b = c \u003e\u003e 16 \u0026 0xff, c \u003e\u003e 8 \u0026 0xff, c \u0026 0xff\r\n ax.plot(r/0xff, g/0xff, b/0xff, \"o\", color=f\"#{c:06x}\")\r\nplt.show()\n```\n\n\n### Actual outcome\n\nWhether we look from an angle or the opposite one, we always have the higher coordinates visible in front (the clear ones, that is the closest to `(1,1,1)`).\n\n### Expected outcome\n\nThe darker points (`(0,0,0)`) should be in front when looking from the \"bottom\" angle, and the lighter points from the other angle (like currently).\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nArch\n\n### Matplotlib Version\n\n3.6.2\n\n### Matplotlib Backend\n\nGTK3Agg\n\n### Python version\n\n3.10.8\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nLinux package manager","author":{"url":"https://github.com/ubitux","@type":"Person","name":"ubitux"},"datePublished":"2022-12-18T18:44:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/24767/matplotlib/issues/24767"}
| 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:73b1a50f-481d-86d8-bc3c-db73d4fc7e6d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF82:856E0:6C954D:701E28:6A520021 |
| html-safe-nonce | ec51ea747fb38dc4800a877ca3bba4d27d62d8e540c6731ab621f7130639bf80 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjgyOjg1NkUwOjZDOTU0RDo3MDFFMjg6NkE1MjAwMjEiLCJ2aXNpdG9yX2lkIjoiNjYxNzM0OTkyOTcwMTYwNTQwOSIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | ce07e387633cbe2757ef99dab4ad358611e222ad00641740bd807c3383fabffe |
| hovercard-subject-tag | issue:1501994715 |
| 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/24767/issue_layout |
| twitter:image | https://opengraph.githubassets.com/70a27c4d584fc2abf6552d5b347ed77f6240af03b34d0aa7141ef05865423d58/matplotlib/matplotlib/issues/24767 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/70a27c4d584fc2abf6552d5b347ed77f6240af03b34d0aa7141ef05865423d58/matplotlib/matplotlib/issues/24767 |
| og:image:alt | Bug summary The depth testing of points depends only on their coordinates and doesn't take into account the camera angle. mpl-3d-depth.mp4 Code for reproduction import matplotlib.pyplot as plt colo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ubitux |
| 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