matplotlib.figure.Figure.get_size_inches and matplotlib.figure.Figure.set_size_inches can be used to adjust the size of the plot figure This works well for me:
from matplotlib import pyplot as plt
x = [1, 2]
yF = [1, 1]
# without resizing
plt.plotgcf(x, y)
x = [1, 2]
ySize = [1, 1]
pltF.plotget_size_inches(x, y)
# get the existing figure
F = plt.gcfset_size_inches()
SizeSize[0]*2, =Size[1]*2, F.get_size_inches(forward=True)
# Set forward to True to resize window along with plot in figure.
F.set_size_inches(Size[0]*2, Size[1]*2, forward=True)
plt.show() # Or plt.imshow(z_array) if using an animation, where z_array is a matrix or NumPy array
This forum post might also help: Resizing figure windows
