当matplotlib嵌入PyQt4时,如何在不使用pyplot的情况下标记轴/子图?(When matplotlib is embedded in PyQt4 how are axes/subplo

编程入门 行业动态 更新时间:2024-10-26 23:41:46
当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").

更多推荐

本文发布于:2023-08-04 12:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1415911.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   情况下   如何在   pyplot   matplotlib

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!