Displaying 1 result from an estimated 1 matches for "cepdexpansion".
2012 Mar 22
1
Questions on plotting using zoo toolbox: (1) dual axes (2)legend
...hat two of them share left y-axis and the third uses right y-axis.
rm(list=ls())
library(zoo)
x1 <- read.csv(file="120322DBCdata.csv", header=TRUE)
x1date<-as.yearqtr(1979)+seq(0,nrow(x1)-1)/4
x1zoo<-zoo(x1, x1date, frequency=4)
x1zoodata<-cbind(x1zoo$D4GDP, x1zoo$D4NE, x1zoo$CEPDexpansion)
plot(x1zoodata, screen=1)
My questions are:
1. How can I have the second y-axis on the right?
2.
The only legend shown in the graph is "x1zoodata", but I would like to
see the names of the components, namely, "D4GDP", "D4NE" and
"CEPDrecession". How c...