[R] How can I shade the background area of a zoo time series object between specific dates?
ggrothendieck at gmail.com
Thu Jun 19 17:42:26 CEST 2008
d1 <- as.Date("2007-04-12")
d2 <- as.Date("2008-05-14")
plot(SP500, type = "n")
rect(d1, par("usr"), d2, par("usr"), col = "red", border = 0)
Also, there is an example using the lattice/grid-based xyplot.zoo in ?xyplot.zoo
On Thu, Jun 19, 2008 at 10:48 AM, Vorlow Constantinos
<CVorlow at eurobank.gr> wrote:
> Dear list members,
> How can I shade the background area of a zoo time series object between
> specific dates?
> SP500<-get.hist.quote("^GSPC", start = "1990-01-01", quote =
> How can I produce the same plot but with a (say) red background between
> Many thanks in advance...
> P Think before you print.
> 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
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help