Title: Update background in SpanSelector._press whenever useblit=True. by anntzer · Pull Request #9660 · matplotlib/matplotlib · GitHub
Open Graph Title: Update background in SpanSelector._press whenever useblit=True. by anntzer · Pull Request #9660 · matplotlib/matplotlib
X Title: Update background in SpanSelector._press whenever useblit=True. by anntzer · Pull Request #9660 · matplotlib/matplotlib
Description: Previously, the canvas would only get redrawn when useblit=True only if span_stays is set. This causes e.g. import sys from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import * from matplotlib.figure import Figure from matplotlib.widgets import SpanSelector class App(QMainWindow): def __init__(self): super().__init__() self.setCentralWidget(QWidget()) layout = QVBoxLayout() self.centralWidget().setLayout(layout) self._fig = Figure() self._fig.subplots() layout.addWidget(FigureCanvas(self._fig)) layout.addWidget(QPushButton("span", clicked=self._span_cb)) def _span_cb(self): self._span = SpanSelector( self._fig.axes[0], print, "horizontal", useblit=True) qapp = QApplication(sys.argv) app = App() app.show() qapp.exec_() to use an incorrect background(?) when clicking and starting a span for the first time. To be honest I'm not sure this is exactly the correct solution, although it does fix the issue... PR Summary 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: Previously, the canvas would only get redrawn when useblit=True only if span_stays is set. This causes e.g. import sys from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import ...
X Description: Previously, the canvas would only get redrawn when useblit=True only if span_stays is set. This causes e.g. import sys from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/9660
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a0c13b61-ddc3-fe27-f3e0-a18b8f8ffeae |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ADEE:338054:51ABA2:76B697:6A549FA9 |
| html-safe-nonce | c69e9ce8ae607d0c9bc7c417075c8f3bdaaf501278e3d0ab4d3873434fd3adb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREVFOjMzODA1NDo1MUFCQTI6NzZCNjk3OjZBNTQ5RkE5IiwidmlzaXRvcl9pZCI6IjM5OTAxNjMxMzI0NjMyMjY3OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dc2d754b9ec9d3346cc17fc9c4865286ad270758c2b20d666ee0a5f9342b2eb5 |
| hovercard-subject-tag | pull_request:150181117 |
| 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/9660/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 | Previously, the canvas would only get redrawn when useblit=True only if span_stays is set. This causes e.g. import sys from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import ... |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width