Issue
I have two datasets covering two different time periods which are back to back. One dataset goes from 0 to 87 and other goes from 88 to 100. Please see below. How do I connect those datasets using a dashed or any distinct line?
My code is as follows:
plt.plot(np.exp(ARIMA.fit.predict(start=88,end=100,dynamic=True)), color = 'red')
plt.plot(np.exp(original_data), color = 'blue')
Solution
I would probably be lazy and do it like this :
fit_array = np.exp(ARIMA.fit.predict(start=88,end=100,dynamic=True))
long_array = np.concatenate([np.exp(original_data), fit_array])
plt.plot(long_array, color = 'blue')
plt.plot(fit_array, color = 'red')
plot the long blue line, which will connect all the points, and then plot the prediction on top.
Answered By - bici.sancta
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.