I have data which i divided into training and test. I want to forecast my test data using my model obtained from the training on the same graph and compare them. I am doing this in R. I want the original data (cocoa) in blue and training data with it 3 period forecast in red. I used the following codes. please help
cocoa<-ts(cofst$Production,start = c(1948),end = c(2019),frequency = 1)
train<-window(cocoa,start = c(1948), end= c(2016), frequency = 1)
test<-window(cocoa,start = c(2017), end= c(2019), frequency = 1)
train
arimaModel_1=arima(train,order=c(1,1,0))
forecast1=forecast(arimaModel_1, h=3)
plot(cocoa,col="blue")
lines(fitted(forecast1),col="red")