I have 4 arrays that p1&p2 and v1&v2 are similar and I like to plotting them on 2 different windows. I use the following code to plot all of them in 1 window, but like to separate them as I said above:
p1 = real_stock_price_volume[:,0]
v1 = real_stock_price_volume[:,1]
p2 = predicted_stock_price_volume[:,0]
v2 = predicted_stock_price_volume[:,1]
plt.plot(p1, color = 'red', label = 'p1')
plt.plot(v1, color = 'brown', label = 'v1')
plt.plot(p2, color = 'blue', label = 'p2')
plt.plot(v2, color = 'green', label = 'v2')
plt.title('Stock Price Prediction')
plt.xlabel('Time')
plt.ylabel('Stock Price')
plt.legend()
plt.show()
How should I change my code?
pyplot.figure()for every plot you want to display in a separate window