Title: TST: Backend switching API (don't merge) by timhoffm · Pull Request #11612 · matplotlib/matplotlib · GitHub
Open Graph Title: TST: Backend switching API (don't merge) by timhoffm · Pull Request #11612 · matplotlib/matplotlib
X Title: TST: Backend switching API (don't merge) by timhoffm · Pull Request #11612 · matplotlib/matplotlib
Description: PR Summary This PR creates a possible API for backend switching. The API is laid out in the last commit. Previous commits are from #11600 and only contain the actual switching logic. The code is not fully tested. It's main purpose is to give an idea how the following API can be implemented: There is a new rcParams['default_backends'] that accepts a list of possible backends to try out. The current behavior for setting the default backend via rcParams['backend'] is deprecated. Reading rcParams['backend'] is deprecated. Users should use rcParams['default_backends']orget_backend()` depeding on their needs. matplotlib.use() is deprecated in favor of set_backend() -- this is independent of the other API changes but adds to consistency. Typical use-cases: Setting the default backend new API: rcParams['default_backends'] = ['qt5agg', 'qt4agg'] current API (deprecated): rcParams['backend'] = 'qt5agg' # only one supported WARNING: The rcParam 'backend' is deprecated. Use 'default_backends' instead. Setting the current backend new API: matplotlib.set_backend('qt5agg') current API (deprecated): matplotlib.use('qt5agg') WARNING: matplotlib.use is deprecated. Use matplotlib.set_backend instead. Querying the current backend: new API: matplotlib.get_backend() current API (deprecated): backend = matplotlib.rcParams['backend'] # returns the current or default backend WARNING: The rcParam 'backend' is deprecated. Use the rcParam 'default_backends' to access the defaults. Use get_backend() to get the current backend."
Open Graph Description: PR Summary This PR creates a possible API for backend switching. The API is laid out in the last commit. Previous commits are from #11600 and only contain the actual switching logic. The code is no...
X Description: PR Summary This PR creates a possible API for backend switching. The API is laid out in the last commit. Previous commits are from #11600 and only contain the actual switching logic. The code is no...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/11612
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a37f2a75-aacb-938e-b643-eee784718dad |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D79E:3BC839:1772C8E:22175BE:6A5646B4 |
| html-safe-nonce | 4d197114f9121f35a3ccf3844cf47ae1ce0a24628a4b2df6b1557971918ca33f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzlFOjNCQzgzOToxNzcyQzhFOjIyMTc1QkU6NkE1NjQ2QjQiLCJ2aXNpdG9yX2lkIjoiOTIyMTg1OTk1MjQ1MjU4NTE0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7e94552fa7c91ae57aec2d247ef0d001782a429d42aadd74357dc5639a60c902 |
| hovercard-subject-tag | pull_request:200237148 |
| 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/11612/files |
| twitter:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| og:image:alt | PR Summary This PR creates a possible API for backend switching. The API is laid out in the last commit. Previous commits are from #11600 and only contain the actual switching logic. The code is no... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 96d96c6ad1e3234907759a5e634942d2ca0aded8a6ec1693a59d0f2c59c0dac9 |
| 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 | f0d7fddec181d430daaf48494eb476abffad4d37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width