You create a QWidget for each plot. But you donβt put canvas or toolbar in it through the layout, so they cannot pass size information using QWidget . By default, a QWidget does not have a minimumSize , and the widget / layout inside QScrollArea can make them as small as it wants to fit in the available space (whose size is QScrollArea ).
Adding graphs through the layout helps, but I found that the FigureCanvas widget also does not have a minimum size, so it can contract. For a quick fix, you can set minimumSize . Part of the loop with these fixes should look like this:
for i in xrange(5): qfigWidget = QtGui.QWidget(qscrollContents) fig = Figure((5.0, 4.0), dpi=100) canvas = FigureCanvas(fig) canvas.setParent(qfigWidget) toolbar = NavigationToolbar(canvas, qfigWidget) axes = fig.add_subplot(111) axes.plot([1,2,3,4])
source share