Title: Update image tutorial. by anntzer · Pull Request #23889 · matplotlib/matplotlib · GitHub
Open Graph Title: Update image tutorial. by anntzer · Pull Request #23889 · matplotlib/matplotlib
X Title: Update image tutorial. by anntzer · Pull Request #23889 · matplotlib/matplotlib
Description: Use Pillow to load the image rather than the discouraged plt.imread. Remove discussion about rescaling to 0-1 as dropping the use of plt.imread also gets rid of that (not so nice) behavior. Also drop the lengthy discussion about uint8 and float32, which seems out of place here (if anything it should be in the Pillow docs). Make corresponding fixes to code to use 0-255 instead of 0-1. Fix subplot management to go full pyplot (the local switch to OO-style is a bit weird). Fix interpolation discussion as the default is now "nearest" (actually it's now "antialiased", but let's sweep that under the rug for this tutorial for now). See #22790. Probably the tutorial could be further improved, but let's consider this a small step in that direction. PR Summary PR Checklist Tests and Styling Has pytest style unit tests (and pytest passes). Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all). Documentation New features are documented, with examples if plot related. New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there). API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there). Documentation is sphinx and numpydoc compliant (the docs should build without error).
Open Graph Description: Use Pillow to load the image rather than the discouraged plt.imread. Remove discussion about rescaling to 0-1 as dropping the use of plt.imread also gets rid of that (not so nice) behavior. Also d...
X Description: Use Pillow to load the image rather than the discouraged plt.imread. Remove discussion about rescaling to 0-1 as dropping the use of plt.imread also gets rid of that (not so nice) behavior. Also d...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/23889
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d278ae07-7f92-40d0-3408-52802e6e656d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C1FC:33B84F:3BA5CEE:52832B4:6A54BFA7 |
| html-safe-nonce | dcc1e8acf08523192460b15cae0979bd6d5edaebbf97556c020c77f97bc191d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUZDOjMzQjg0RjozQkE1Q0VFOjUyODMyQjQ6NkE1NEJGQTciLCJ2aXNpdG9yX2lkIjoiMzM3MDkwNjE5NjQ0NjA2ODY0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b534cbea91478c401c2ce47dff833c2a1034c2c50c2b0be41041e22c8a06eb4e |
| hovercard-subject-tag | pull_request:1056309659 |
| 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/23889/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | Use Pillow to load the image rather than the discouraged plt.imread. Remove discussion about rescaling to 0-1 as dropping the use of plt.imread also gets rid of that (not so nice) behavior. Also d... |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 69f9664dd5e7a82ba8ab1b4cb7f5a2f09333ab38 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width