Title: MacOSX does not render frames in which new artists are added when blitting · Issue #17445 · matplotlib/matplotlib · GitHub
Open Graph Title: MacOSX does not render frames in which new artists are added when blitting · Issue #17445 · matplotlib/matplotlib
X Title: MacOSX does not render frames in which new artists are added when blitting · Issue #17445 · matplotlib/matplotlib
Description: Bug report Bug summary Using FuncAnimation with the MacOSX backend and blitting turned on, every frame in which a new artist or patch is added to the axes is blank, while all other frames render normally. This does not happen with the Tk...
Open Graph Description: Bug report Bug summary Using FuncAnimation with the MacOSX backend and blitting turned on, every frame in which a new artist or patch is added to the axes is blank, while all other frames render no...
X Description: Bug report Bug summary Using FuncAnimation with the MacOSX backend and blitting turned on, every frame in which a new artist or patch is added to the axes is blank, while all other frames render no...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17445
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MacOSX does not render frames in which new artists are added when blitting","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nUsing FuncAnimation with the MacOSX backend and blitting turned on, every frame in which a new artist or patch is added to the axes is blank, while all other frames render normally. This does not happen with the TkAgg backend, and presumable MacOSX is the only affected backend.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nfrom random import random\r\n\r\nimport matplotlib\r\nmatplotlib.use('MacOSX')\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.animation import FuncAnimation\r\n\r\nfig = plt.figure()\r\naxe = fig.add_axes([0, 0, 1, 1], frameon=False)\r\ncircles = []\r\n\r\ndef update(i):\r\n if not i % 10:\r\n new_circle = plt.Circle((random(), random()), 0.05, color='black')\r\n axe.add_patch(new_circle)\r\n circles.append(new_circle)\r\n\r\n for circle in circles:\r\n circle.center = (random(), random())\r\n\r\n return circles\r\n\r\nanimation = FuncAnimation(fig, update, frames=60, interval=1000/2, repeat=False, blit=True)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nEvery 10th frame, when a new circle is added to the axes, the figure is blank; every other frame outputs normally.\r\n\r\n**Expected outcome**\r\n\r\nEvery frame should render.\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: macOS Mojave 10.14.6\r\n * Matplotlib version: 3.2.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): MacOSX\r\n * Python version: 3.8.2\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\nInstalled using Conda from conda-forge.\r\n","author":{"url":"https://github.com/mfosterw","@type":"Person","name":"mfosterw"},"datePublished":"2020-05-18T18:42:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/17445/matplotlib/issues/17445"}
| 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:750af1ee-dc8b-d266-28f1-a59642f07726 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4CA:16BCD3:ADFB8DE:F4C96A2:6A51041C |
| html-safe-nonce | 75e24729d6c4032337f4c99550fe5533c114d6720598eaa8866d6e2b80f505db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNENBOjE2QkNEMzpBREZCOERFOkY0Qzk2QTI6NkE1MTA0MUMiLCJ2aXNpdG9yX2lkIjoiMTkwMDA0MzYwMDI0NDMxMTA2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4a64f48fef467d2d7434a8c64820d6341b385ceb873a62611d580f8c37a92590 |
| hovercard-subject-tag | issue:620425044 |
| 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/17445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2c25d7b8599049417b258fc8e745d30d6a13d43c85b7aca40b3f9a4ad5f75a37/matplotlib/matplotlib/issues/17445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2c25d7b8599049417b258fc8e745d30d6a13d43c85b7aca40b3f9a4ad5f75a37/matplotlib/matplotlib/issues/17445 |
| og:image:alt | Bug report Bug summary Using FuncAnimation with the MacOSX backend and blitting turned on, every frame in which a new artist or patch is added to the axes is blank, while all other frames render no... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mfosterw |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | 2d129404fc45ea64edb1b98567c53e55b395536f |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width