Title: fix minor grid overlapping by ImportanceOfBeingErnest · Pull Request #11762 · matplotlib/matplotlib · GitHub
Open Graph Title: fix minor grid overlapping by ImportanceOfBeingErnest · Pull Request #11762 · matplotlib/matplotlib
X Title: fix minor grid overlapping by ImportanceOfBeingErnest · Pull Request #11762 · matplotlib/matplotlib
Description: PR Summary Possible fix for #11758. Here we run into the classic problem of 0.06 % 0.02 != 0 numerically. So in addition to the condition a % b > something we also can check if a % b is not actually close to b itself (~np.isclose(a%b, b)). Previously, the following code import matplotlib.pyplot as plt plt.ylim(0, 0.11) plt.minorticks_on() plt.grid(True, 'minor', 'y', linewidth=3) plt.grid(True, 'major', color='k', linewidth=3) plt.show() would result in an overlapping grid line at y=0.06, With this PR the output is as expected. PR Checklist Has Pytest style unit tests Code is PEP 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: PR Summary Possible fix for #11758. Here we run into the classic problem of 0.06 % 0.02 != 0 numerically. So in addition to the condition a % b > something we also can check if a % b is not act...
X Description: PR Summary Possible fix for #11758. Here we run into the classic problem of 0.06 % 0.02 != 0 numerically. So in addition to the condition a % b > something we also can check if a % b is not...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/11762
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d60cf974-5d74-c277-07a8-8e3b01b11395 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 80AC:2E9211:15E12B:1DAE1A:6A553450 |
| html-safe-nonce | 6ab4a6a0c5f35392e9344cb0d56a8b746a610cf5c55424abacdc74508367003f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEFDOjJFOTIxMToxNUUxMkI6MURBRTFBOjZBNTUzNDUwIiwidmlzaXRvcl9pZCI6IjcwNjQ5NTA4MDExNTI5NDcyODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fb2f4880ad76282b660fa17685a7f4d41009f6f31576140f3beef3eb4ed773de |
| hovercard-subject-tag | pull_request:203382189 |
| 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/11762/files |
| twitter:image | https://avatars.githubusercontent.com/u/23121882?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/23121882?s=400&v=4 |
| og:image:alt | PR Summary Possible fix for #11758. Here we run into the classic problem of 0.06 % 0.02 != 0 numerically. So in addition to the condition a % b > something we also can check if a % b is not act... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbd8fce4d63ac394c5405faa20aa50d5c9e56b979ac43ee1b26f8e7c47c4cd89 |
| 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 | cf96660b44878f418b09d3d6ecde00ad62332910 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width