[R-SIG-Finance] R-SIG-Finance Digest, Vol 38, Issue 1

Rory Winston rory.winston at gmail.com
Mon Jul 2 22:30:59 CEST 2007

Hi all

I have a question re: adding legends to a series of plots. I am
creating a lag plot of 100 days worth of EUR/USD log returns. I just
type lag.plot(logR, 100), and it creates a nice array of subplots. Now
what I would like to do is add a legend (or X label, alternatively) to
each plot, showing the correlation coefficient for each lag. So each
subplot would have a legend or label saying p=0.9....etc. The trouble
is, I have no idea how to do this. Does anyone have any experience
with annotating subplots? Or would I need to do it all in one big loop
(set up the subplot window using par(), plot one lag at a time,
calculate rho and then add a legend)?


More information about the R-SIG-Finance mailing list