Hello,

I want to plot a time series and add lines to the plot later on.
However, this seems to work only as long as I plot the series against
the default index. As soon as I plot against an object
of class chron or POSIXt (i.e. I want to add a date/time axis), the
lines do not appear anymore. The command to add the lines is executed
without an error message.

(THIS DOES NOT ADD THE LINES)
plot(datum2[(3653):(3653+i)],dlindus[(3653):(3653+i)], col
=hcl(h=60,c=35,l=60), ylim=c(-8,8), type = "l", xlab=(""),
ylab=("Return"), main = ("Industry"))
lines(gvarindus, type="l", lwd=2)
lines(quantindustlow, col ="black", type = "l",lty=3)
lines(quantindusthigh, col ="black", type = "l",lty=3)

(THIS ADDS THE LINES, but then I dont have an date axis)
 plot(dlindus[(3653):(3653+i)], col =hcl(h=60,c=35,l=60), ylim=c(-8,8),
type = "l", xlab=(""), ylab=("Return"), main = ("Industry"))
lines(gvarindus, type="l", lwd=2)
lines(quantindustlow, col ="black", type = "l",lty=3)
lines(quantindusthigh, col ="black", type = "l",lty=3)

This sounds like a fairly simple problem, but I cannot find any answer
in the R-help archives.

Thanks alot.

Zeno

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to