Title: [Bug]: Widget blitting broken when saving as PDF · Issue #25075 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Widget blitting broken when saving as PDF · Issue #25075 · matplotlib/matplotlib
X Title: [Bug]: Widget blitting broken when saving as PDF · Issue #25075 · matplotlib/matplotlib
Description: Bug summary When running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitting, or the blitting is not turned off c...
Open Graph Description: Bug summary When running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitt...
X Description: Bug summary When running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitt...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25075
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Widget blitting broken when saving as PDF","articleBody":"### Bug summary\n\nWhen running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitting, or the blitting is not turned off correctly in the button widgets.\n\n### Code for reproduction\n\n```python\nmake -C doc latexpdf\n```\n\n\n### Actual outcome\n\n```pytb\r\n/home/elliott/code/matplotlib-3.7.x/doc/users/next_whats_new/widget_button_styling.rst:8: WARNING: Exception occurred in plotting widget_button_styling-1\r\n from /home/elliott/code/matplotlib-3.7.x/doc/users/next_whats_new/widget_button_styling.rst:\r\nTraceback (most recent call last):\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/sphinxext/plot_directive.py\", line 615, in render_figures\r\n figman.canvas.figure.savefig(img.filename(fmt), dpi=dpi)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/figure.py\", line 3328, in savefig\r\n self.canvas.print_figure(fname, **kwargs)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/backend_bases.py\", line 2362, in print_figure\r\n result = print_method(\r\n ^^^^^^^^^^^^^\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/backend_bases.py\", line 2228, in \u003clambda\u003e\r\n print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(\r\n ^^^^^\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/backends/backend_pdf.py\", line 2815, in print_pdf\r\n self.figure.draw(renderer)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/artist.py\", line 95, in draw_wrapper\r\n result = draw(artist, renderer, *args, **kwargs)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/artist.py\", line 72, in draw_wrapper\r\n return draw(artist, renderer)\r\n ^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/figure.py\", line 3135, in draw\r\n DrawEvent(\"draw_event\", self.canvas, renderer)._process()\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/backend_bases.py\", line 1259, in _process\r\n self.canvas.callbacks.process(self.name, self)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/cbook/__init__.py\", line 309, in process\r\n self.exception_handler(exc)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/cbook/__init__.py\", line 96, in _exception_printer\r\n raise exc\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/cbook/__init__.py\", line 304, in process\r\n func(*args, **kwargs)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/widgets.py\", line 1706, in _clear\r\n self.ax.draw_artist(self._buttons)\r\n File \"/home/elliott/code/matplotlib-3.7.x/lib/matplotlib/axes/_base.py\", line 3076, in draw_artist\r\n a.draw(self.figure.canvas.get_renderer())\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nAttributeError: 'FigureCanvasPdf' object has no attribute 'get_renderer'\r\n```\n\n### Expected outcome\n\nDocs build without warning.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nFedora 37\n\n### Matplotlib Version\n\nv3.7.x\n\n### Matplotlib Backend\n\nPDF\n\n### Python version\n\n3.11.1\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/QuLogic","@type":"Person","name":"QuLogic"},"datePublished":"2023-01-25T08:35:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/25075/matplotlib/issues/25075"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:54939d12-2f09-b1f2-3796-aac7769c07bc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B188:1A0816:2563AA:31D3CA:6A518982 |
| html-safe-nonce | 8e8c5bf9f2e141490e244d3835978d71e327f5a53dd8ba04e9062082a45328b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTg4OjFBMDgxNjoyNTYzQUE6MzFEM0NBOjZBNTE4OTgyIiwidmlzaXRvcl9pZCI6IjI2NzI1MDEzNDUzOTk5NjYwODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 324e8f9e7e17f19fe5c1759330e215117b07a7c9106ebd89a2e0c44f3e411453 |
| hovercard-subject-tag | issue:1556251021 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/25075/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f6d7ab647cdc4912a07fb610f58f80cda76c1d5fd2f806e92ddfbfdc5c0da54/matplotlib/matplotlib/issues/25075 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f6d7ab647cdc4912a07fb610f58f80cda76c1d5fd2f806e92ddfbfdc5c0da54/matplotlib/matplotlib/issues/25075 |
| og:image:alt | Bug summary When running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | QuLogic |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cb77a7b8b06cd86c243be33fd8e7922d70a9d243 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width