Title: BUG: Ensure that distinct polygon collections are shaded identically by eric-wieser · Pull Request #12792 · matplotlib/matplotlib · GitHub
Open Graph Title: BUG: Ensure that distinct polygon collections are shaded identically by eric-wieser · Pull Request #12792 · matplotlib/matplotlib
X Title: BUG: Ensure that distinct polygon collections are shaded identically by eric-wieser · Pull Request #12792 · matplotlib/matplotlib
Description: Right now, shading ratios are computed by computing a shade in [-1, 1] for each face from the normal vector, and then normalizing across the polygon collection so that the brightest face has shade=1, and the dimmest shade=0.5. This behaves poorly with multiple polygon collections, as the normalization is internal to each. This results in two polygons with the same orientation but in different collections ending up with different shadings. Notably, this obstructs the shading of ax.voxels(). This approach instead scales [-1, 1] to [0.4, 1], ignoring the local brightness minima and maxima within a collection. Some more noticeable effects of this change: Highlights will be darker, unless they were already directly facing the light source Contrast between extreme highlights and shadows will be slightly greater (from 1:0.5 to 1:0.4) PR Summary PR Checklist Has Pytest style unit tests Code is Flake 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: Right now, shading ratios are computed by computing a shade in [-1, 1] for each face from the normal vector, and then normalizing across the polygon collection so that the brightest face has shade=...
X Description: Right now, shading ratios are computed by computing a shade in [-1, 1] for each face from the normal vector, and then normalizing across the polygon collection so that the brightest face has shade=...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/12792
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:67eba40c-9623-219f-8567-a629bea0b4de |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 810A:2373A7:1F652EB:2D8FD8A:6A54FD29 |
| html-safe-nonce | 9701fe043749a7ad9931b3001b412d5d11660837ed51d1e1c903a9e3be18e987 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTBBOjIzNzNBNzoxRjY1MkVCOjJEOEZEOEE6NkE1NEZEMjkiLCJ2aXNpdG9yX2lkIjoiODIwNTg5MTE3MjM2NTA0MDkzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e9824862ab8f4d6da0faff8d26d4776a7d5fa207f783d2ccc2ecc4762d86118c |
| hovercard-subject-tag | pull_request:229988987 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/12792/files |
| twitter:image | https://avatars.githubusercontent.com/u/425260?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/425260?s=400&v=4 |
| og:image:alt | Right now, shading ratios are computed by computing a shade in [-1, 1] for each face from the normal vector, and then normalizing across the polygon collection so that the brightest face has shade=... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | eae2aab99907699a22d2c8449aa683ca74454fca87211b98f7c7b722086b2839 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a35ab858be185cd86d12b93a43bccf34e8d8536 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width