Title: Drawing the canvas does not populate ticklabels on MacOSX backend · Issue #19268 · matplotlib/matplotlib · GitHub
Open Graph Title: Drawing the canvas does not populate ticklabels on MacOSX backend · Issue #19268 · matplotlib/matplotlib
X Title: Drawing the canvas does not populate ticklabels on MacOSX backend · Issue #19268 · matplotlib/matplotlib
Description: Bug report Bug summary This is basically the same issue as #6103, but I have found that the "correct" approach selectively fails on the macosx backend. I decided to open a separate issue because there's a lot going on in the original thr...
Open Graph Description: Bug report Bug summary This is basically the same issue as #6103, but I have found that the "correct" approach selectively fails on the macosx backend. I decided to open a separate issue because th...
X Description: Bug report Bug summary This is basically the same issue as #6103, but I have found that the "correct" approach selectively fails on the macosx backend. I decided to open a separate issue ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Drawing the canvas does not populate ticklabels on MacOSX backend","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\nThis is basically the same issue as #6103, but I have found that the \"correct\" approach selectively fails on the macosx backend. I decided to open a separate issue because there's a lot going on in the original thread.\r\n\r\n(BTW I do support the suggestion in the original thread that `get_{x/y}ticklabels` should implicitly draw so that it always returns a sensible result).\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nax = plt.figure().subplots()\r\nax.plot([\"a\", \"b\", \"c\"], [1, 2, 3])\r\nax.figure.canvas.draw()\r\nprint(ax.get_xticklabels())\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\nUsing the MacOSX backend:\r\n\r\n```\r\n[Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]\r\n```\r\n\r\n**Expected outcome**\r\n\r\nUsing an agg-based backend:\r\n\r\n```\r\n[Text(0, 0, 'a'), Text(1, 0, 'b'), Text(2, 0, 'c')]\r\n```\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:\r\n * Matplotlib version: (`import matplotlib; print(matplotlib.__version__)`) 3.3.3\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): macosx\r\n * Python version: 3.8\r\n * Jupyter version (if applicable): n/a\r\n * Other libraries: n/a\r\n","author":{"url":"https://github.com/mwaskom","@type":"Person","name":"mwaskom"},"datePublished":"2021-01-09T13:20:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/19268/matplotlib/issues/19268"}
| 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:cdcc01be-771c-7aba-3842-c9c9e7bbfc2f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9178:2D0224:11F3F29:1863C63:6A520DB6 |
| html-safe-nonce | 82a1de7de46ebc24c4c5d1dfef4adc677b2befe3e9bae954af40f0b25e9211fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTc4OjJEMDIyNDoxMUYzRjI5OjE4NjNDNjM6NkE1MjBEQjYiLCJ2aXNpdG9yX2lkIjoiMjg2ODg3Nzg4MDIxNzE3NzUyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6a57bf2ab4c188c02ed6d61038e5d0be3e68b8554c90ec583eb03a37c5e44e54 |
| hovercard-subject-tag | issue:782606804 |
| 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/19268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1acb2784cf4e8449307f68f1ada8db9d6725eb9eebab85771ebe1c7d54b7c551/matplotlib/matplotlib/issues/19268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1acb2784cf4e8449307f68f1ada8db9d6725eb9eebab85771ebe1c7d54b7c551/matplotlib/matplotlib/issues/19268 |
| og:image:alt | Bug report Bug summary This is basically the same issue as #6103, but I have found that the "correct" approach selectively fails on the macosx backend. I decided to open a separate issue because th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mwaskom |
| 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