当matplotlib嵌入PyQt4中时,如何在不使用pyplot的情况下标记轴/子图? [英] When matplotlib is embedded in PyQt4 how are axes/subplots labelled without using pyplot?

查看:48
本文介绍了当matplotlib嵌入PyQt4中时,如何在不使用pyplot的情况下标记轴/子图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 pyplot 很容易,但显然嵌入时不应使用 pyplot.我找不到任何使用标签的非 pyplot 嵌入示例.

It's easy with pyplot but apparently pyplot shouldn't be used when embedding. I haven't been able to find any non-pyplot embedding examples where labels are used.

推荐答案

也许您找到了页面.也许 这个 示例有帮助.我尚未对其进行测试,因此无法确定它是否有效.

Maybe you found this page, too. Maybe this example helps. I have not tested it, thus I cannot say if it works.

与matplotlib示例中的示例相同,可以使用 self.axes.set_xlabel(x Label) self.axes.set_ylabel("y Label").

Staying with the example from the matplotlib example, the labels in the subplot self.axes can be set using self.axes.set_xlabel(x Label") or self.axes.set_ylabel("y Label").

这篇关于当matplotlib嵌入PyQt4中时,如何在不使用pyplot的情况下标记轴/子图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆