I'm not sure you'll be able to come up with 42 categorial colors: perhaps facetting / small-multiples here? Colorspace (on CRAN) will let you make palettes manually, so perhaps that's worth looking at.
Michael On Fri, May 4, 2012 at 7:49 AM, Gavin Blackburn <gavin.blackb...@strath.ac.uk> wrote: > Hi, > > Thanks for the help. Extending the palette to 16 or 20 would be a big help. > The largest number of files I've had to handle in a single group is 42 and I > wouldn't expect it to get much bigger than that. > > I'll take a look at RColorBrewer. > > Cheers, > > Gavin. > > -----Original Message----- > From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] > Sent: 04 May 2012 12:43 > To: Gavin Blackburn > Cc: r-help@r-project.org > Subject: Re: [R] colours in a pdf > > How many colors are you looking for? There are limits to how many the > eye can make out, but perhaps the RColorBrewer package would be a > place to start. Also check out: http://colorbrewer2.org/ > > To see all the builtin colors, you can simply use the colors() > function, but your viewer won't be able to distinguish most of them. > > Michael > > On Fri, May 4, 2012 at 7:39 AM, Gavin Blackburn > <gavin.blackb...@strath.ac.uk> wrote: >> Hi, >> >> I'm plotting PDFs and have a problem. If I have more than 8 sources of data >> the colours are repeated. These plots are used to remove poor data from the >> sets so it would be helpful if I could expand the colour range. Is there any >> way to do this? >> >> The plots are coloured by defining a vector colsVec<-1:(length(mzXMLfiles)) >> >> And defined in the loop for (file in 1:length(mzXMLfiles)) >> >> as col=file >> >> The legend is then coloured using the same vector using col=colsVec >> >> Any help would be greatly appreciated. At the moment I have to break up data >> into sets of 8 and hope that a large number of those are good data sets so I >> have an aid to identify bad sets. >> >> Thanks, >> >> Gavin. >> >> Dr. Gavin Blackburn >> SULSA Technologist >> >> Strathclyde institute of Pharmacy and Biomedical Science >> 161 Cathedral Street, >> Glasgow. >> G4 0RE >> >> Tel: +44 (0)1415483828 >> >> ScotMet: The Scottish Metabolomics Facility >> www.metabolomics.strath.ac.uk<http://www.metabolomics.strath.ac.uk> >> >> >> [[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. ______________________________________________ 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.