I am trying to have many subplots (7*4 rows*col) using following code:
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(100)
y = np.arange(100)
for i in range(28):
plt.subplot(4, 7, i+1)
plt.scatter(x, y)
plt.tight_layout()
plt.show()
It produces all subplots together but with wide margins around individual figures:
If I omit tight_layout()
then they are closer together but have a large margin at top, bottom, right and left:
How can I reduce or remove extra space from between as well as around the figures?