[R] How can I shade the background area of a zoo time series object between specific dates?

From: Vorlow Constantinos <CVorlow_at_eurobank.gr>
Date: Thu, 19 Jun 2008 17:48:18 +0300


Dear list members,  

How can I shade the background area of a zoo time series object between specific dates?  

eg.

    library(tseries)
    library(zoo)
    SP500<-get.hist.quote("^GSPC", start = "1990-01-01", quote = "Close")

    plot(SP500)  

How can I produce the same plot but with a (say) red background between  

    2007-04-12  

and  

    2008-05-14  

?  

Many thanks in advance...  

Costas

P Think before you print.

Disclaimer:
This e-mail is confidential. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete the copy from your system. EFG Eurobank Ergasias S.A. is not responsible for, nor endorses, any opinion, recommendation, conclusion, solicitation, offer or agreement or any information contained in this communication. EFG Eurobank Ergasias S.A. cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. If you suspect that the message may have been intercepted or amended, please call the sender.

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 19 Jun 2008 - 15:02:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 19 Jun 2008 - 16:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive