plotter.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:DGP 作者: DynamicGravitySystems 项目源码 文件源码
def get_toolbar(self, parent=None) -> QtWidgets.QToolBar:
        """
        Get a Matplotlib Toolbar for the current plot instance, and set toolbar actions (pan/zoom) specific to this plot.
        Parameters
        ----------
        [parent]
            Optional Qt Parent for this object

        Returns
        -------
        QtWidgets.QToolBar : Matplotlib Qt Toolbar used to control this plot instance
        """
        toolbar = NavigationToolbar(self, parent=parent)
        toolbar.actions()[4].triggered.connect(self.toggle_pan)
        toolbar.actions()[5].triggered.connect(self.toggle_zoom)
        return toolbar
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号