view.py 文件源码

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

项目:inspector 作者: WattyAB 项目源码 文件源码
def setup_figure(self):
        # Figure
        fig = Figure((8.0, 6.0), dpi=90, facecolor=FIG_FACECOLOR)
        canvas = FigureCanvas(fig)
        canvas.setSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding
        )
        canvas.setFocusPolicy( Qt.ClickFocus )
        canvas.setFocus() # put last?
        toolbar = NavigationToolbar(canvas, parent=self)
        # Since we have only one plot, we can use add_axes
        # instead of add_subplot, but then the subplot
        # configuration tool in the navigation toolbar wouldn't
        # work.
        #
#         self.axes = self.fig.add_subplot(111)
#         self.axes = self.fig.axes

        # Create the navigation toolbar, tied to the canvas
        #

        return fig, canvas, toolbar
#         self.request_canvas_redraw()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号