I am new to Python and I am trying to make a subplot that will stack all subplots in a single column. With the current code I have, it will make the subplots in the correct position, but all in different figure windows. How can I keep all the subplots in one window during this loop (python)? Below is the code that I currently have:
while i <= len(row_number)-1:
i = int(i)
t = int((len(row_number)))
figure, axes = plt.subplots(nrows=t)
g = data.iloc[:, p]
axes[i].plot(g)
axes[i].set_title('Muscle {}'.format(muscle_list[i]))
axes[i].set_xlabel('Number of Frames')
axes[i].set_ylabel('Voltage')
figure.suptitle('EMG of Muscles {}'.format(muscle_list))
i = i + 1
plt.show()