Title: [Bug]: canvas.manager.set_window_title does not work to figure with `WebAgg` backend · Issue #29256 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: canvas.manager.set_window_title does not work to figure with `WebAgg` backend · Issue #29256 · matplotlib/matplotlib
X Title: [Bug]: canvas.manager.set_window_title does not work to figure with `WebAgg` backend · Issue #29256 · matplotlib/matplotlib
Description: Bug summary canvas.manager.set_window_title does not work to figure with WebAgg backend (but MacOSX). the title is still Figure 1 by default. Code for reproduction import matplotlib.pyplot as plt import numpy as np import matplotlib matp...
Open Graph Description: Bug summary canvas.manager.set_window_title does not work to figure with WebAgg backend (but MacOSX). the title is still Figure 1 by default. Code for reproduction import matplotlib.pyplot as plt i...
X Description: Bug summary canvas.manager.set_window_title does not work to figure with WebAgg backend (but MacOSX). the title is still Figure 1 by default. Code for reproduction import matplotlib.pyplot as plt i...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29256
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: canvas.manager.set_window_title does not work to figure with `WebAgg` backend","articleBody":"### Bug summary\n\ncanvas.manager.set_window_title does not work to figure with `WebAgg` backend (but MacOSX). the title is still `Figure 1` by default.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport matplotlib\r\nmatplotlib.use(\"WebAgg\")\r\n\r\nfig = plt.figure(figsize=(7, 5))\r\nfig.canvas.manager.set_window_title(\"My figure\")\r\nax = fig.add_subplot(111)\r\n\r\ndx, dy = 0.05, 0.05\r\ny, x = np.mgrid[slice(1, 5 + dy, dy),\r\nslice(1, 5 + dx, dx)]\r\nz = np.sin(x)**10 + np.cos(10 + y*x) * np.cos(x)\r\n\r\ncf = ax.contourf(x + dx/2., y + dy/2., z)\r\nfig.colorbar(cf, ax=ax)\r\n\r\nplt.show()\n```\n\n\n### Actual outcome\n\n\u003cimg width=\"724\" alt=\"image\" src=\"https://github.com/user-attachments/assets/065b0b52-ec9e-44f6-85cd-86fb3a7486d4\"\u003e\r\n\n\n### Expected outcome\n\n\u003cimg width=\"709\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4fec14df-fc6f-4f4e-bd01-db872f4c8250\"\u003e\r\n\n\n### Additional information\n\nit works in MacOSX backends\r\n\r\n\u003cimg width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6c4b67ef-28f3-46d7-ae65-532af995979f\"\u003e\r\n\n\n### Operating system\n\nmacOS Sequoia 15.1.1\n\n### Matplotlib Version\n\n3.9.3\n\n### Matplotlib Backend\n\nWebAgg\n\n### Python version\n\n3.12.7\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/YongcaiHuang","@type":"Person","name":"YongcaiHuang"},"datePublished":"2024-12-08T08:19:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/29256/matplotlib/issues/29256"}
| 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:9e7d2701-b44c-1461-ee0b-1c29baf7ca02 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B752:159AA0:212DEC:2E1996:6A50F8D9 |
| html-safe-nonce | 4ef259178fc38906ab1bc8e269967925c63cb7ab23bad468b3994c15463072a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzUyOjE1OUFBMDoyMTJERUM6MkUxOTk2OjZBNTBGOEQ5IiwidmlzaXRvcl9pZCI6Ijc1OTcyNDg5MzAxOTIwOTU0NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 56072de8c97aa05acc7074f2629379f1993caf6ff4fcece85e7785e1cd076f25 |
| hovercard-subject-tag | issue:2725046038 |
| 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/29256/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ab3d3bb7605a4c51609efa99ad6ba77e8fd932c6de68e28b3af987f540c8e02/matplotlib/matplotlib/issues/29256 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ab3d3bb7605a4c51609efa99ad6ba77e8fd932c6de68e28b3af987f540c8e02/matplotlib/matplotlib/issues/29256 |
| og:image:alt | Bug summary canvas.manager.set_window_title does not work to figure with WebAgg backend (but MacOSX). the title is still Figure 1 by default. Code for reproduction import matplotlib.pyplot as plt i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | YongcaiHuang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| 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 | 8d836581d020676cc0ef4a83cd2fe17e4af02c3d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width