How Can I add a legent (showing x1, x2, x3, x4) to the last plot?
require(TSA)
require(graphics)
require(stats)
t-1986:2011
x1-cos(t*1990/2011)
x2-cos(t*2000/20011)
x3-sin(t*1990/2011)
x4-sin(t*2000/2011)
y-cbind(t,x1,x2, x3,x4)
y.time = ts(y.time, start=1986, frequency=1)
y.spc-spec.pgram(y.time,
plot.spec uses matplot. see ?matplot for default col lty and use
legend as usual.
P.S. You can add plot=FALSE to spec.pgram to prevent it from plotting
On 08/27/2011 05:39 PM, Peter Maclean wrote:
How Can I add a legent (showing x1, x2, x3, x4) to the last plot?
require(TSA)
2 matches
Mail list logo