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

David Winsemius dwinsemius at comcast.net
Fri Nov 20 20:03:25 CET 2009


On Nov 20, 2009, at 1:56 PM, anna_l wrote:

>
> 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:

If you are going to be asking a lot of questions, then please take the  
time to read the Posting Guide and the message at tehend of every r- 
help reply:
"and provide commented, minimal, self-contained, reproducible code."


> -- 
> 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.
>
> ______________________________________________
> 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list