当 matplotlib 嵌入到 PyQt4 中时,如何在不使用 pyplot 的情况下标记 axes/subplots?

When matplotlib is embedded in PyQt4 how are axes/subplots labelled without using pyplot?

使用 pyplot 很容易,但显然 。我无法找到任何使用标签的非 pyplot 嵌入示例。

也许您发现这个 page, too. Maybe this 示例有帮助。我没有测试过,所以我不能说它是否有效。

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

设置子图 self.axes 中的标签