i want to plot multiple columns from a dataframe in multiple plots.
My code looks like this:
fig, axs = plt.subplots(6)
axs[0].plot(data.Date,[data[aapl],data['High_'+aapl],data['Low_'+aapl]])
axs[1].plot(data.Date,[data[msft],data['High_'+msft],data['Low_'+msft]])
axs[2].plot(data.Date,[data[fb],data['High_'+fb],data['Low_'+fb]])
axs[3].plot(data.Date,[data[amzn],data['High_'+amzn],data['Low_'+amzn]])
axs[4].plot(data.Date,[data[nflx],data['High_'+nflx],data['Low_'+nflx]])
axs[5].plot(data.Date,[data[googl],data['High_'+googl],data['Low_'+googl]])
The error i get is:
ValueError: x and y must have same first dimension, but have shapes (1995,) and (3, 1995)
I know x and y need to have the same shape, but how can i solve this problem here? My entire data is within one dataframe and should have the same shape. Is it possible to pass a list as a y value and change the shape?
aapl = "EOD/AAPL - Adj_Close"
msft = "EOD/MSFT - Adj_Close"
fb = "EOD/FB - Adj_Close"
amzn = "EOD/AMZN - Adj_Close"
nflx = "EOD/NFLX - Adj_Close"
googl = "EOD/GOOGL - Adj_Close"

