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
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.