Title: Draw not caching with macosx backend · Issue #7550 · matplotlib/matplotlib · GitHub
Open Graph Title: Draw not caching with macosx backend · Issue #7550 · matplotlib/matplotlib
X Title: Draw not caching with macosx backend · Issue #7550 · matplotlib/matplotlib
Description: Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend: import matplotlib matplotlib.use('macosx') import matplotlib.pyplot as plt fig, ax = plt.subplots(1...
Open Graph Description: Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend: import matplotlib matplotlib.use('macosx') import matplotli...
X Description: Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend: import matplotlib matplotlib.use('macosx') import m...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7550
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Draw not caching with macosx backend","articleBody":"Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend:\r\n\r\n```\r\nimport matplotlib\r\nmatplotlib.use('macosx')\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots(1, 1)\r\nim = plt.imshow([[1, 2], [3, 4]])\r\nfig.canvas.draw()\r\nax.draw_artist(im)\r\n```\r\n\r\nError for macosx backend is:\r\n\r\n```\r\n\r\nTraceback (most recent call last):\r\n File \"draw_artist.py\", line 8, in \u003cmodule\u003e\r\n ax.draw_artist(im)\r\n File \"/Users/mb312/dev_trees/matplotlib/lib/matplotlib/axes/_base.py\",\r\nline 2423, in draw_artist\r\n raise AttributeError(msg)\r\nAttributeError: draw_artist can only be used after an initial draw\r\nwhich caches the render\r\n```\r\n\r\nIt seems to me that the previous call `fig.canvas.draw()` is the \"initial draw\" that should cache the renderer. So, is this a bug?","author":{"url":"https://github.com/matthew-brett","@type":"Person","name":"matthew-brett"},"datePublished":"2016-12-02T04:29:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/7550/matplotlib/issues/7550"}
| 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:83ee4c86-f194-7e2a-b242-36c187c087c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC90:234E06:3E94F6:54C6B4:6A525F2D |
| html-safe-nonce | 9e1383624f6e0345c7470074264c39466ad2c4e825d5d46663bc5ca70f435f3d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzkwOjIzNEUwNjozRTk0RjY6NTRDNkI0OjZBNTI1RjJEIiwidmlzaXRvcl9pZCI6IjI1ODYxNDMzMjI3NDI2MTE3NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 12648b74770e9c55a7eaa518134c36ec631186f53925e87e3a8e039b06654f83 |
| hovercard-subject-tag | issue:193031937 |
| 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/7550/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c49f419a99835e15f85c6c6629b56cbef2ddc5d64e15f6ae73389f99f3c8b24e/matplotlib/matplotlib/issues/7550 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c49f419a99835e15f85c6c6629b56cbef2ddc5d64e15f6ae73389f99f3c8b24e/matplotlib/matplotlib/issues/7550 |
| og:image:alt | Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend: import matplotlib matplotlib.use('macosx') import matplotli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matthew-brett |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width