Title: Cannot remove the legend from a visible plot window · Issue #96 · PlotPyStack/PythonQwt · GitHub
Open Graph Title: Cannot remove the legend from a visible plot window · Issue #96 · PlotPyStack/PythonQwt
X Title: Cannot remove the legend from a visible plot window · Issue #96 · PlotPyStack/PythonQwt
Description: insertLegend(None) does not remove the legend if show() is already been called. from PyQt5.QtWidgets import QApplication from qwt import QwtPlot, QwtPlotCurve, QwtLegend app = QApplication([]) plot = QwtPlot() legend = QwtLegend() plot.i...
Open Graph Description: insertLegend(None) does not remove the legend if show() is already been called. from PyQt5.QtWidgets import QApplication from qwt import QwtPlot, QwtPlotCurve, QwtLegend app = QApplication([]) plot...
X Description: insertLegend(None) does not remove the legend if show() is already been called. from PyQt5.QtWidgets import QApplication from qwt import QwtPlot, QwtPlotCurve, QwtLegend app = QApplication([]) plot...
Opengraph URL: https://github.com/PlotPyStack/PythonQwt/issues/96
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot remove the legend from a visible plot window","articleBody":"`insertLegend(None)` does not remove the legend if `show()` is already been called.\n\n```python\nfrom PyQt5.QtWidgets import QApplication\nfrom qwt import QwtPlot, QwtPlotCurve, QwtLegend\n\napp = QApplication([])\n\nplot = QwtPlot()\nlegend = QwtLegend()\nplot.insertLegend(legend, plot.TopLegend)\n\nx_values = list(range(0, 10))\ncurve = QwtPlotCurve(\"Curve\")\ncurve.setData(x_values, x_values)\ncurve.attach(plot)\n\nplot.updateAxes()\nplot.show()\n# Remove the legend\nplot.insertLegend(None)\n\napp.exec()\n```\n\nCalling `legend.setParent(None)` before `insertLegend(None)` fix the issue and the legend is removed accordingly. If `show` is called before `inserLegend(None)`, it also works correctly.\n\nPythonQwt: 0.14.4\nPyQt: 5.15.11\n","author":{"url":"https://github.com/igortg","@type":"Person","name":"igortg"},"datePublished":"2025-03-13T17:51:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/96/PythonQwt/issues/96"}
| 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:bd667874-40cb-3d95-5d9f-9f383f7365dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 922C:336EAB:10CE574:16B7C9B:69732F75 |
| html-safe-nonce | b5e34f1e73e96f50e3855ff47ac3aef507310edc6ff0b2d6d82210740cd3ca11 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjJDOjMzNkVBQjoxMENFNTc0OjE2QjdDOUI6Njk3MzJGNzUiLCJ2aXNpdG9yX2lkIjoiNTMyNDQwMTc0OTUxNzM0ODcyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f8eb7d526dfeda873c4ca4381fcf640849be0573972dd7f8193f643758c6367 |
| hovercard-subject-tag | issue:2917995517 |
| 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/PlotPyStack/PythonQwt/96/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7bec93b8eb8c6e8c027b6ebb0e221f8d9a24ff5d7e0158c17e0d56e8036eb26f/PlotPyStack/PythonQwt/issues/96 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7bec93b8eb8c6e8c027b6ebb0e221f8d9a24ff5d7e0158c17e0d56e8036eb26f/PlotPyStack/PythonQwt/issues/96 |
| og:image:alt | insertLegend(None) does not remove the legend if show() is already been called. from PyQt5.QtWidgets import QApplication from qwt import QwtPlot, QwtPlotCurve, QwtLegend app = QApplication([]) plot... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | igortg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4 |
| turbo-cache-control | no-preview |
| go-import | github.com/PlotPyStack/PythonQwt git https://github.com/PlotPyStack/PythonQwt.git |
| octolytics-dimension-user_id | 145201262 |
| octolytics-dimension-user_login | PlotPyStack |
| octolytics-dimension-repository_id | 41204495 |
| octolytics-dimension-repository_nwo | PlotPyStack/PythonQwt |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 41204495 |
| octolytics-dimension-repository_network_root_nwo | PlotPyStack/PythonQwt |
| 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 | a5e2b48bd1260476599758f5d253b5d24092ab84 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width