Title: Closer-to-native signatures for native canvas and toolbar classes · Issue #17349 · matplotlib/matplotlib · GitHub
Open Graph Title: Closer-to-native signatures for native canvas and toolbar classes · Issue #17349 · matplotlib/matplotlib
X Title: Closer-to-native signatures for native canvas and toolbar classes · Issue #17349 · matplotlib/matplotlib
Description: Currently, the signature of FigureCanvas subclasses is FigureCanvasFoo(figure), except for wx where it is FigureCanvasWx(parent, id, figure) (#10606). These signatures appears to play not-so-nicely with a number of GUI builder tools (wxG...
Open Graph Description: Currently, the signature of FigureCanvas subclasses is FigureCanvasFoo(figure), except for wx where it is FigureCanvasWx(parent, id, figure) (#10606). These signatures appears to play not-so-nicely...
X Description: Currently, the signature of FigureCanvas subclasses is FigureCanvasFoo(figure), except for wx where it is FigureCanvasWx(parent, id, figure) (#10606). These signatures appears to play not-so-nicely...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17349
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Closer-to-native signatures for native canvas and toolbar classes","articleBody":"Currently, the signature of FigureCanvas subclasses is `FigureCanvasFoo(figure)`, except for wx where it is `FigureCanvasWx(parent, id, figure)` (#10606). These signatures appears to play not-so-nicely with a number of GUI builder tools (wxGlade, QtDesigner) which expect to be able to build such objects without passing in a Figure instance. For example, wxGlade and QtDesigner both expect (I believe) to be able to call `FigureCanvas(parent)`, or perhaps(?) `FigureCanvas(parent=parent)` (https://github.com/matplotlib/matplotlib/pull/10606#issuecomment-605621291, #11423), and likewise the third-party QtQuick backend (https://github.com/jmitrevs/matplotlib_backend_qtquick) patches the constructor to make the `figure` parameter optional.\r\n\r\nIt would seem safe enough to make `figure` optional in the base class (and all subclasses) and just construct a new Figure instance if none is passed. It would also be nice to check what are exactly the signature requirements for the various GUI builders, and whether similar changes need to be done for Toolbar classes.","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2020-05-07T09:48:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/17349/matplotlib/issues/17349"}
| 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:c3ccbf4c-ea5d-8e20-d6bf-898919c6ad94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A08:399A66:711A34:9AB16D:6A538771 |
| html-safe-nonce | c2e76dae1cda2553b238981af9bcefce004052829225cc407dffa83bbd5bcdab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTA4OjM5OUE2Njo3MTFBMzQ6OUFCMTZEOjZBNTM4NzcxIiwidmlzaXRvcl9pZCI6IjE3MDUwMjA0NDM5ODIwMDYxMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0fed07dcb5fb07d992d5f390380415383fbcee9d30b350d5ded7affe37222db7 |
| hovercard-subject-tag | issue:613921879 |
| 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/17349/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a44f994f4fc526295617f789272ae8b45235c8a7e60cd0a95f24e09561bbb516/matplotlib/matplotlib/issues/17349 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a44f994f4fc526295617f789272ae8b45235c8a7e60cd0a95f24e09561bbb516/matplotlib/matplotlib/issues/17349 |
| og:image:alt | Currently, the signature of FigureCanvas subclasses is FigureCanvasFoo(figure), except for wx where it is FigureCanvasWx(parent, id, figure) (#10606). These signatures appears to play not-so-nicely... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width