当matplotlib嵌入PyQt4时,如何在不使用pyplot的情况下标记轴/子图?(When matplotlib is embedded in PyQt4 how are axes/subplots labelled without using 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.
最满意答案
也许你也找到了这个页面 。 也许这个例子有帮助。 我没有测试过,因此我不能说它是否有效。
继续使用matplotlib示例中的示例,可以使用self.axes.set_xlabel(x Label")或self.axes.set_ylabel("y Label")设置子图self.axes中的self.axes.set_ylabel("y Label") 。
Maybe you found this page, too. Maybe this example helps. I have not tested it, thus I cannot say if it works.
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").
更多推荐
发布评论