gpt4 book ai didi

python - PySide 代替 PyQt4 作为 matplotlib Qt4Agg 后端的先决条件

转载 作者:太空狗 更新时间:2023-10-30 02:46:14 24 4
gpt4 key购买 nike

我有一个关于将 Qt4Agg 后端与 matplotlib 一起使用的先决条件的快速问题。在documentation ,它说 Qt4Agg 需要 PyQt4。但是,由于 matplotlib 现在可以与 PySide 而不是 PyQt4 完美配合,我可以只安装 PySide 吗?我还需要安装 PyQt4 才能让 matplotlib 与 Pyside 一起工作吗?

我问这个问题是因为在 example在 PySide 中使用 matplotlib,后端必须切换到 Qt4Agg,并且根据文档需要 PyQt4。

谢谢!

最佳答案

在您的 rcparam 文件中添加行

backend.qt4 : PySide        # PyQt4 | PySide

关于python - PySide 代替 PyQt4 作为 matplotlib Qt4Agg 后端的先决条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21494838/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com