I have 3 datasets, each one with 30 different time series inside it, and I would like to plot all of them side by side, making a grid 30x3. This is the code I have a the moment:
for i in range(30):
plt.subplot(i+1, 1, 1) # row i, col 1 index 1
plt.plot(train[:, i].reshape(-1,), label='train')
plt.title("Sensor "+str(i))
plt.subplot(i+1, 2, 1) # row i, col 2 index 1
plt.plot(val[:, i].reshape(-1,), label='val')
plt.title("Sensor "+str(i))
plt.subplot(i+1, 3, 1) # row i, col 3 index 1
plt.plot(test[:, i].reshape(-1,), label='test')
plt.title("Sensor "+str(i))
plt.show()
The results I want, is to print row by row, but with this code I only have one column instead of three. Specifically, I get the last element I plot (test[:,i]). How can I plot 3 elements side by side in each iteration of my loop?