[R] Plot not too dense line plot

Jim Lemon jim at bitwrit.com.au
Mon Sep 10 11:24:37 CEST 2012


On 09/10/2012 06:14 PM, Alaios wrote:
> Dear all,
> I am including in a plot 6 different lines (?lines) with 6 different line types.
> The problem is that I have so dense information that the line types are not visible any more.
>
> In the code below
>
>
> myLength<-length(currentSet)
> plot(seq(from=1,to=myMax,length.out=myLength),currentSet, type="l",xlim=c(1,myMax),axes=F,...)
>
> the myLength is 100.000+ elements.
>
> I would like to ask you how I can print each line including only 500 points.
>
> I have searched already and there is no parameter for that in plot or in lines.
>
> Probably I need to alter the currentSet variable before giving it as an input to the plot or lines function.
>
> Could you please help me?
>
Hi Alex,
My guess is that you want to reduce the local variation in the lines. If 
so, take the mean of each 200 values (or 1/500th of myLlength) and plot 
that.

Jim




More information about the R-help mailing list