par(mfrow=c(2,2),mar=c(3,5,2,3)) plot.zoo(oil.xts['2003::2007'],col = c("blue","red","green"), lwd=0.8,las=1,plot.type = "single" , xlab="Year", ylab="USD",main="Crude Oil Prices(2003~2007)") legend("topleft",colnames(oil.xts), lty = 1, col = c("blue","red","green")) abline(h=c(25,30,50),lty=3,lwd=0.5,col=c("red","green","blue")) plot.zoo(oil.xts['2008::2010'],col = c("blue","red","green"), lwd=0.8,las=1,plot.type = "single" , xlab="Year", ylab="USD",main="Crude Oil Prices(2008~2010)") legend("topright",colnames(oil.xts), lty = 1, col = c("blue","red","green")) abline(h=c(25,30,50),lty=3,lwd=0.5,col=c("red","green","blue")) plot.zoo(oil.xts['2011::2013'],col = c("blue","red","green"), lwd=0.8,las=1,plot.type = "single" , xlab="Year", ylab="USD",main="Crude Oil Prices(2011~2013)") legend("topright",colnames(oil.xts), lty = 1, col = c("blue","red","green")) abline(h=c(25,30,50),lty=3,lwd=0.5,col=c("red","green","blue")) plot.zoo(oil.xts['2014::'],col = c("blue","red","green"), lwd=0.8,las=1,plot.type = "single" , xlab="Year", ylab="USD",main="Crude Oil Prices(2014~)") legend("topright",colnames(oil.xts), lty = 1, col = c("blue","red","green")) abline(h=c(25,30,50),lty=3,lwd=0.5,col=c("red","green","blue")) par(mfrow=c(1,1))
|