[R] Problem at adding lines on a graphics with lines() function

anna_l lippelanna21 at hotmail.com
Fri Nov 20 19:56:25 CET 2009


Hello, I am trying to plot a graphic with many lines with the following
command:

plot(datas[1:n,1],datas[1:n,2],type="l",main="SP500 Prices and Moving
Averages",xlab="Date",ylab="Prices",col="black")
lines(datas[1:n,1],datas[1:n,3],type="l",col="green",lty="solid")

But I just see the first curve. I have tried it on the console separately
and it´s still not working. There is no error message but I can´t see the
second curve. Is there a parameter that I need to change with par()?
Thank you

-----
Anna Lippel
new in R so be careful I should be asking a loooooooot of questions!:teeth:
-- 
View this message in context: http://old.nabble.com/Problem-at-adding-lines-on-a-graphics-with-lines%28%29-function-tp26443627p26443627.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list