Title: Fix huge imshow range by tacaswell · Pull Request #18458 · matplotlib/matplotlib · GitHub
Open Graph Title: Fix huge imshow range by tacaswell · Pull Request #18458 · matplotlib/matplotlib
X Title: Fix huge imshow range by tacaswell · Pull Request #18458 · matplotlib/matplotlib
Description: PR Summary closes #18415 We need to special case when rescaling the user input for interpolation with LogNorm. The issue is that due to the inherent precision limits of floating point math we can end up with errors on the order if 1e-18 of the overall data range when rescaling. If the bottom vlim is close to 0 and the top is order 10e20 than this error can result in the rescaled vmin being negative which then fails when we (temporarily) change the vmin/vmax on the norm. We started adjusting the vmin/vmax to work around the same issue with float precision in #17636 / 3dea5c7 to make sure that values exactly equal to the limits did not move across the boundary and get erroneously mapped is over/under. Long term we may want to add the ability for the norms to suggest to their clients what the constraints on the vmin/vmax are, but hard-coding a special case for LogNorm is the pragmatic solution. There are still some issues with this sort of extreme data range. With the default interpretation (anti-aliased) when zoomed out we will get stippling that disappears when you zoom in (because the interpolation kernels are not perfect and the constant background at -1 picks up noise on a scale big enough to get above 100 (this is because we shrink and re-scale the data to the [0, 1] range before interpolation and then scale back out to the full range at the end). It is extra visible on this example because things are flipping between "bad" (defaults to white) and "good but small". PR Checklist Has pytest style unit tests (and pytest passes). Is Flake 8 compliant (run flake8 on changed files to check).
Open Graph Description: PR Summary closes #18415 We need to special case when rescaling the user input for interpolation with LogNorm. The issue is that due to the inherent precision limits of floating point math we can ...
X Description: PR Summary closes #18415 We need to special case when rescaling the user input for interpolation with LogNorm. The issue is that due to the inherent precision limits of floating point math we can ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/18458
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5cfe300c-ad32-4bcd-2caa-b8f7f1886150 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EDD6:1E5BA8:4CC70B:689590:6A540AD8 |
| html-safe-nonce | 8ef84f0128c337cea14e7c15c5c5217b3bd03148b670ff0d684d75136f2ee947 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREQ2OjFFNUJBODo0Q0M3MEI6Njg5NTkwOjZBNTQwQUQ4IiwidmlzaXRvcl9pZCI6IjUxNTkyMDM1MjQ3Nzc4NzIwODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 60def56eb67d58affdaf5c1a04bd86550a700b2439cf3a54370125aaf469a85a |
| hovercard-subject-tag | pull_request:485489656 |
| 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/18458/files |
| twitter:image | https://avatars.githubusercontent.com/u/199813?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/199813?s=400&v=4 |
| og:image:alt | PR Summary closes #18415 We need to special case when rescaling the user input for interpolation with LogNorm. The issue is that due to the inherent precision limits of floating point math we can ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width