Tags Python , Qt

A few months ago I posted a couple of demo snippets for embedding matplotlib plots into wxPython GUIs.

Well, as I'm now in the process of moving to PyQt for my GUI needs in Python, I've reimplemented one of the demos with PyQt. Here's a screenshot:

And the demo itself can be taken from here.

The demo features:

  • Using the maplotlib navigation toolbar
  • Adding data to the plot dynamically
  • Dynamically modifying the plot's properties
  • Processing matplotlib events in the GUI
  • Saving the plot to a file from a menu
The embedding of matplotlib into PyQt is relatively smooth and similar to wxPython, with a couple of tiny differences (which mainly have to do with how the two frameworks handle parenting of GUI elements). Note that I've reimplemented only one of the demos, but it's really sufficient for getting started with combining the two libraries. ::...
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
若有不妥, 欢迎评注提醒:


订阅 substack 体验古早写作:

点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:


关于 ~ DebugUself with DAMA ;-)
公安备案号: 44049002000656 ...::