Title: Fix colorbar bad ticks by jklymak · Pull Request #11556 · matplotlib/matplotlib · GitHub
Open Graph Title: Fix colorbar bad ticks by jklymak · Pull Request #11556 · matplotlib/matplotlib
X Title: Fix colorbar bad ticks by jklymak · Pull Request #11556 · matplotlib/matplotlib
Description: PR Summary As noted in issue #11510, extra ticks can get into the colorbar that extend past the minimum or maximum due to the presence of the "extend='both/lower/upper'` kwarg. This fixes that issue for major ticks. An enhancement would be to come up with a cb.minorticks_on function to colorbar that supplies the appropriately trimmed minor tick locator as well. That can be a further PR. But this really fixes a bug in the existing functionality... import matplotlib.pyplot as plt import numpy as np np.random.seed(seed=12345) x = np.random.randn(20, 20) fig, ax = plt.subplots() im = ax.pcolormesh(x) cbar = fig.colorbar(im, extend='both') plt.show() Before: After 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 As noted in issue #11510, extra ticks can get into the colorbar that extend past the minimum or maximum due to the presence of the "extend='both/lower/upper'` kwarg. This fi...
X Description: PR Summary As noted in issue #11510, extra ticks can get into the colorbar that extend past the minimum or maximum due to the presence of the "extend='both/lower/upper'` kw...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/11556
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2d5674fc-50e8-235f-43fc-2f95ad3134c9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EE02:32D7CA:F78874:14C6B74:6A56B757 |
| html-safe-nonce | 75ca091bcd984187ba9c2ed5db1f4273a2f2697d46c66427b46cc8e013031851 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTAyOjMyRDdDQTpGNzg4NzQ6MTRDNkI3NDo2QTU2Qjc1NyIsInZpc2l0b3JfaWQiOiI2NjY5MTkyMDA2MDMwNzY3OTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f01b476f05013288e53483c72beb0dbb0f5d8065527214ecf669cb92c2773a38 |
| hovercard-subject-tag | pull_request:198833670 |
| 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/11556/files |
| twitter:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| og:image:alt | PR Summary As noted in issue #11510, extra ticks can get into the colorbar that extend past the minimum or maximum due to the presence of the "extend='both/lower/upper'` kwarg. This fi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | df99b7164e1d961b639cf5d3cbd6b5ba673edc67bd7e47cdc4746b96099e11ae |
| 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 | c29ba03b1896083dbe1084f6cd1c5367d8a0d67c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width