In this case you make the matplotlib figure take up the entire window, replacing the central widget. This means you cannot use QtDesigner to add UI controls and would have to do it all by hand.
Is there any way to embed just the axes in a Qt widget such as GraphicsView? While matplotlib figures are designed to use the whole window, a single axis could just use one widget. You can do this with pyqtgraph ( a diffent plotting library), but I’m not sure if its possible with matplotlib.