Re: [R] add a legend to a periodogram

2011-08-31 Thread David Winsemius
On Aug 31, 2011, at 12:06 PM, Peter Maclean wrote: Hi: Trying for hours to add a legend to a periodogram. Any help will be appreciated. For example, how can I add a legent (showing x1, x2, x3, x4) to both plots (generated by spec.program() and plot()? Here is a worked example. require(T

Re: [R] add a legend to a periodogram

2011-08-31 Thread Peter Maclean
Hi: Trying for hours to add a legend to a periodogram. Any help will be appreciated. For example, how can I add a legent (showing x1, x2, x3, x4) to both plots (generated by spec.program() and plot()? Here is a worked example. require(TSA) require(graphics) require(stats) t<-1986:2011 x1<-cos(t*1