Title: ENH: adjustable colorbar ticks by jklymak · Pull Request #9903 · matplotlib/matplotlib · GitHub
Open Graph Title: ENH: adjustable colorbar ticks by jklymak · Pull Request #9903 · matplotlib/matplotlib
X Title: ENH: adjustable colorbar ticks by jklymak · Pull Request #9903 · matplotlib/matplotlib
Description: PR Summary This PR changes colorbar to draw from self.vmin to self.vmax instead of from 0 to 1 so that AutoTickLocator can work. Only modifies ticks if no boundaries are specified (i.e. contours). See #9246 example: import matplotlib.pyplot as plt import matplotlib.colors as mcolors import numpy as np X = np.random.randn(32, 32) fig, ax = plt.subplots(2, 2, figsize=(5, 5), tight_layout=True) for nn, shrink in enumerate([1., 0.4]): for mm, log in enumerate([False, True]): if log: norm = mcolors.LogNorm() Y = 10**X else: norm = None Y = X pc = ax[nn, mm].pcolormesh(Y, norm=norm) ax[nn, mm].set_xticks([]) ax[nn, mm].set_yticks([]) fig.colorbar(pc, ax=ax[nn,mm], shrink=shrink, extend='both') plt.show() fig.savefig('ExampleCBOld.png') before: after: PR Checklist Test/get to work LogNorm Has Pytest style unit tests Code is PEP 8 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 This PR changes colorbar to draw from self.vmin to self.vmax instead of from 0 to 1 so that AutoTickLocator can work. Only modifies ticks if no boundaries are specified (i.e. contours)....
X Description: PR Summary This PR changes colorbar to draw from self.vmin to self.vmax instead of from 0 to 1 so that AutoTickLocator can work. Only modifies ticks if no boundaries are specified (i.e. contours)....
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/9903
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1b0728db-5dff-79b1-3cf8-1ee7bfc1fe30 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E222:3FB6B5:1920470:2299492:6A573292 |
| html-safe-nonce | 3d5d33281b105997eb3adf121c09b031fbf0f46e2d0618c0eaca76282a9115fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjIyOjNGQjZCNToxOTIwNDcwOjIyOTk0OTI6NkE1NzMyOTIiLCJ2aXNpdG9yX2lkIjoiNDM2MDk4MDU2Mjg3MTUzMDEzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b078baeb1d77ec5fc37471702b60409d02d087f7277df772b0b18db3d461c827 |
| hovercard-subject-tag | pull_request:155934818 |
| 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/9903/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 This PR changes colorbar to draw from self.vmin to self.vmax instead of from 0 to 1 so that AutoTickLocator can work. Only modifies ticks if no boundaries are specified (i.e. contours).... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | 2576d1f0198cf1588faf2edf27f1ed120903be10 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width