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? B.R Alex [[alternative HTML version deleted]]
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
> > 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.Perhaps plot a lowess or loess curve to show trend instead of a point to point line? S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
Hello, Something like this? step <- myLength %/% 500 ix500 <- seq(1, myLength, by = step) curSubset <- currentSet[ix500] plot(seq(from = 1, to = myMax, length.out = 500), curSubset, ...etc... Hope this helps, Rui Barradas Em 10-09-2012 09:14, Alaios escreveu:> 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? > > B.R > Alex > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help@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.[[alternative HTML version deleted]]