[R] Sos! "Lines" doesn't add plots to an existing plot...

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Jan 31 08:28:44 CET 2006


Michael wrote:

>>plot(testError, col="red")
>>lines(testVar, col="black")
> 
> 
> Only one plot (the red one) appear on the Window, the black line did not
> appear...what's wrong?

Hang on a second, just let me hack into your machine so I can find out 
what 'testError' and 'testVar' are....

I'm guessing that the lines for 'testVar' are outside the range of the 
plot formed by 'testError', but this is a guess and it could be a 
bazillion other things. We have no way of knowing unless you tell is the 
first things about testError and testVar.

For starters, try telling us what:

  str(testVar)
  str(testError)
  summary(testVar)
  summary(testError)

say.

Barry




More information about the R-help mailing list