The existing solution How do I change the figure size with subplots? does not answer my question.
fig, axs = plt.subplots(2, 2, figsize=(15, 15)) # Does not work in my case!
Other answers in my case of plotting two images with this code do not work also.
How can I resize a plot consisting of two side by side image subplots? I plot subplots in Jupyter notebook:
import matplotlib.pyplot as plt
import matplotlib.image as img
ref_img = img.imread(ref_img_path)
test_img = img.imread(test_img_path)
plt.subplot(1, 2, 1) # row 1, col 2 index 1
plt.title("Reference Form")
plt.imshow(ref_img)
plt.subplot(1, 2, 2) # index 2
plt.title("Test Form ")
plt.imshow(test_img)
plt.show()
I am not trying to create individual subplots of different size, but need to resize a plot as a whole to use maximum space in Jupyter cell.