Title: Incorrect overlap of markers in scatter3D · Issue #5830 · matplotlib/matplotlib · GitHub
Open Graph Title: Incorrect overlap of markers in scatter3D · Issue #5830 · matplotlib/matplotlib
X Title: Incorrect overlap of markers in scatter3D · Issue #5830 · matplotlib/matplotlib
Description: I understand that 3d plotting is as yet a bit hacky, but from what little I understand of the code for Path3DCollection (or is it Patch3DCollection as the docstring for scatter says?), it feels like this should be fixable (patches aren't...
Open Graph Description: I understand that 3d plotting is as yet a bit hacky, but from what little I understand of the code for Path3DCollection (or is it Patch3DCollection as the docstring for scatter says?), it feels lik...
X Description: I understand that 3d plotting is as yet a bit hacky, but from what little I understand of the code for Path3DCollection (or is it Patch3DCollection as the docstring for scatter says?), it feels lik...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5830
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect overlap of markers in scatter3D","articleBody":"I understand that 3d plotting is as yet a bit hacky, but from what little I understand of the code for `Path3DCollection` (or is it `Patch3DCollection` as the docstring for scatter says?), it feels like this should be fixable (patches aren't intersecting each other here).\n\nI'm using Matplotlib v1.5.0. The zorder of markers plotted by 3d scatter goes wrong in certain views.\n\nHere's a minimal example:\n\n``` py\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\nx = np.array([-1, 0, 1])\ny = np.array([0, 0, 0])\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')\npatches = ax.scatter(x, y, y, s=2500, c=x)\nplt.show()\n```\n\nI've made the marker sizes really huge to illustrate the point clearly - in the initial view, the overlap is correct (in this example), but on rotation, it goes wrong:\n\n\n\nIt's not fully clear because of the depthshading, but red is on top of green, which is on top of blue.\nIt definitely looks like _some_ zorder information is present - depthshade is using it correctly - but it's not being used to update the drawing order correctly.\n\nThis problem gets severely exacerbated as the number of scatter points increases. To demonstrate, execution of [this](https://gist.github.com/praveenv253/5927af4f22b4d441ac4f) gist produces the following ugly result:\n\nThe sphere ought to be mostly red (it's the top view of a spherical grid with color=z-coordinate), instead it's mostly blue because of poor ordering. Rotating it will make it seem like there are holes in the sphere at different places because of incorrect overlap in some strange patterns.\n","author":{"url":"https://github.com/praveenv253","@type":"Person","name":"praveenv253"},"datePublished":"2016-01-11T07:20:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/5830/matplotlib/issues/5830"}
| 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:16b09d06-3eb2-4009-f1db-ca21980d97c8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAFC:145779:4933F:6C268:6A55D99D |
| html-safe-nonce | ca6859e4daf7bcab5ee5a5c4f285c038416b8ce32c2843927fc31859bd2dc9d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUZDOjE0NTc3OTo0OTMzRjo2QzI2ODo2QTU1RDk5RCIsInZpc2l0b3JfaWQiOiI1Njk0MDU3OTMyNDUyNjQ5Mzc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5d814bcb726465db525018fb2a4e6e4183f749002a4f1972f122511ced782096 |
| hovercard-subject-tag | issue:125886805 |
| 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/5830/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5a8200a6cbeb730a2090750143ae8e591eac3ef3768b95a3601f448e3f1812fe/matplotlib/matplotlib/issues/5830 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5a8200a6cbeb730a2090750143ae8e591eac3ef3768b95a3601f448e3f1812fe/matplotlib/matplotlib/issues/5830 |
| og:image:alt | I understand that 3d plotting is as yet a bit hacky, but from what little I understand of the code for Path3DCollection (or is it Patch3DCollection as the docstring for scatter says?), it feels lik... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | praveenv253 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 8f8e1726192df8dce16872ceb503336c12e9ae78 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width