Title: ENH: allow matplotlib.use after getbackend by jklymak · Pull Request #12608 · matplotlib/matplotlib · GitHub
Open Graph Title: ENH: allow matplotlib.use after getbackend by jklymak · Pull Request #12608 · matplotlib/matplotlib
X Title: ENH: allow matplotlib.use after getbackend by jklymak · Pull Request #12608 · matplotlib/matplotlib
Description: PR Summary
Closes the long-desired ability to just call matplotlib.use so long as another GUI backend hasn't been started:
Closes #12362 (for example)
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Qt5Agg')
print('backend:', matplotlib.get_backend())
if not matplotlib.get_backend() == 'MacOSX':
matplotlib.use('MacOSX')
print('backend:', matplotlib.get_backend())
plt.plot(range(10))
plt.show()
matplotlib.use('Qt5Agg')
With this PR:
$ pythonw testgetbackend.py
backend: Qt5Agg
backend: MacOSX
Traceback (most recent call last):
File "testgetbackend.py", line 11, in
Open Graph Description: PR Summary Closes the long-desired ability to just call matplotlib.use so long as another GUI backend hasn't been started: Closes #12362 (for example) import matplotlib import matplotlib.pyplot...
X Description: PR Summary Closes the long-desired ability to just call matplotlib.use so long as another GUI backend hasn't been started: Closes #12362 (for example) import matplotlib import matplotlib.py...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/12608
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a7436cd0-02b2-f8c5-a435-63500f3d52c7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ADC8:39F6AF:30F9F1:44213B:6A57B74F |
| html-safe-nonce | c8f034611c76147b3e2ca4a347c5ceb257303c29b348e041fefeb0979e376623 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREM4OjM5RjZBRjozMEY5RjE6NDQyMTNCOjZBNTdCNzRGIiwidmlzaXRvcl9pZCI6IjgyNDg1NDQzMDM2MDMyMzQ2MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a26900e5a3ce1598a319f9248b7803901a801094344ffaac12aaf7882bb1a156 |
| hovercard-subject-tag | pull_request:225244386 |
| 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/12608/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 Closes the long-desired ability to just call matplotlib.use so long as another GUI backend hasn't been started: Closes #12362 (for example) import matplotlib import matplotlib.pyplot... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 899c314dfde9abcf8fc1fe8c04f09866b347ea06f43166d653afc482795c9fca |
| 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 | 67aa73f3bba9e68b2de0ebe01c65fcd120461cba |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width