[R] Smooth line in graph

Nestor Fernandez nestor at ual.es
Thu Sep 20 12:13:46 CEST 2007


Sorry, I answered too quickly.
It worked with the "simplified" example I provided but not with 
non-regular intervals in x:

x<-c(-45,67,131,259,347)
y <- c(0.31, 0.45, 0.84, 0.43, 0.25)

plot(x,y)
lines(spline(x,y, method='n', n=250))
#or:
lines(predict(interpSpline(x, y)))

Produce the same decrease between first two points and the shape is 
quite different to that produced by sigmaplot -I need comparable 
figures. Changing "method" and "n" arguments did not help.

Sorry for bothering. Any other suggestion?




Greg Snow escribió:
> Try:
>
>   
>> lines(spline(x,y, method='n', n=250))
>>     
>
>



More information about the R-help mailing list