[R] smoothing plot(x, type ='l')

Jim Lemon jim at bitwrit.com.au
Thu Jun 8 03:23:26 CEST 2006


Federico Calboli wrote:
> Hi All,
> 
> I am using plot(x, type = 'l') for some plotting, but I would like rounded edges 
> rather than jagged edges in the plot (purely for aestetic reasons).
> 
> How could I achieve that?
> 
Perhaps you want something like:
x<-rnorm(50)
plot(spline(1:50,x),type="l")

Jim



More information about the R-help mailing list