Title: Using opacityscale with surface results in ordering by addition order, not depth · Issue #4918 · plotly/plotly.js · GitHub
Open Graph Title: Using opacityscale with surface results in ordering by addition order, not depth · Issue #4918 · plotly/plotly.js
X Title: Using opacityscale with surface results in ordering by addition order, not depth · Issue #4918 · plotly/plotly.js
Description: Hi all, been using plotly with R for a while now and really loving it - thanks for assembling such a phenomenal program! I'd like to report a bug found while plotting multiple surface objects, which causes them to layer in the order they...
Open Graph Description: Hi all, been using plotly with R for a while now and really loving it - thanks for assembling such a phenomenal program! I'd like to report a bug found while plotting multiple surface objects, whic...
X Description: Hi all, been using plotly with R for a while now and really loving it - thanks for assembling such a phenomenal program! I'd like to report a bug found while plotting multiple surface objects, ...
Opengraph URL: https://github.com/plotly/plotly.js/issues/4918
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using opacityscale with surface results in ordering by addition order, not depth","articleBody":"Hi all, been using plotly with R for a while now and really loving it - thanks for assembling such a phenomenal program! I'd like to report a bug found while plotting multiple surface objects, which causes them to layer in the order they're added rather than the \"depth\" at which they should really render in the figure. See this [codepen](https://codepen.io/wkumler/pen/GRoZaEK) for code and examples, which are also rendered below as screenshots.\r\n\r\nI previously [posted in ropensci/plotly](https://github.com/ropensci/plotly/issues/1781), but have since learned enough Javascript to assemble the codepen and the issue persists, making me think it's not an R problem. There's also no discussion of the [new \"opacityscale\" feature](https://github.com/plotly/plotly.js/issues/4331) there and a [lively discussion here](https://github.com/plotly/plotly.js/issues?q=is%3Aissue+opacityscale), making me hopeful that more people will have some idea how I might fix this if it isn't a bug.\r\n\r\n### This is great:\r\n\r\n\r\n\r\n### This is less great (same figure rotated to look from below):\r\n\r\n\r\n\r\nIt seems that the surface that renders always on \"top\" is the one that's added last in the data array. If we alter the above code a little bit to render the top layer surface before the middle one, we get some more interesting results:\r\n\r\n`Plotly.newPlot('graphDivReorderOpac', [data_z1, data_z3, data_z2]);` rather than `Plotly.newPlot('graphDivReorderOpac', [data_z1, data_z2, data_z3]);`\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nApologies for the repetitive code in the codepen - I really did learn *just* enough JS to make this one and will be hiding behind R wrappers in the future.\r\n","author":{"url":"https://github.com/wkumler","@type":"Person","name":"wkumler"},"datePublished":"2020-06-12T20:42:35Z","url":"https://github.com/plotly/plotly.js/issues/4918"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:61460680-a4fb-b670-3809-e12541c46b1a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6E2:172B92:26C4A8C:33A83DA:6B01AB0E |
| html-safe-nonce | 7353775f143cef8a4918f8920565558a912e328a1ee6db0c7ca0a78a39d04e3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkUyOjE3MkI5MjoyNkM0QThDOjMzQTgzREE6NkIwMUFCMEUiLCJ2aXNpdG9yX2lkIjoiMTUzMzM3MzU4NzgzNzI2NjcwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e81093664944f40fe8e89e29dc47047261ced54d91e0ccc5facac9a4c2a39511 |
| hovercard-subject-tag | issue:637993654 |
| 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/plotly/plotly.js/4918/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b21b362e4914154ca1c5747556687a33b0b43ba72227981c02fb42cb1e1865e8/plotly/plotly.js/issues/4918 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b21b362e4914154ca1c5747556687a33b0b43ba72227981c02fb42cb1e1865e8/plotly/plotly.js/issues/4918 |
| og:image:alt | Hi all, been using plotly with R for a while now and really loving it - thanks for assembling such a phenomenal program! I'd like to report a bug found while plotting multiple surface objects, whic... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wkumler |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width