how to make a graph fill all the window

后端 未结 3 1204
别那么骄傲
别那么骄傲 2021-01-06 10:41

I am ploting a graph in an application created with QtDesigner, the problem is that, when the grapth is showed, a big \"grey edge\" appears between the graph space and the m

3条回答
  •  迷失自我
    2021-01-06 10:55

    With an embedded graph as self.ui.mplwidget, a very simple self.ui.mplwidget.figure.tight_layout() will do the job, without defining a canvas before. If you have other features on the graph such as axis labels or title, just be sure to put the self.ui.mplwidget.figure.tight_layout() after those.

提交回复
热议问题