Hi Phil and Thomas,
Thanks for your helpful feedback.  I must admit my solution to creating the
vector of colors lacked your elegance.
In brief, I saved the output of colors() into a text file, saved all but 47
colours in that file and read it back as a data frame and used the first
column of the dataframe as a vector of 47 colours. This roundabout method
may have caused the  problem because when I chose colours according to the
commands sent by both of you things seemed to work just fine.
Thank you very much for your feedback.
Anjan

On Thu, Oct 7, 2010 at 3:25 PM, Thomas Stewart <tgstewart@gmail.com> wrote:

> I would be helpful if you provided a more complete, reproducible example.
>  Consider the following code.  It colors the boxes according to the first 47
> colors listed in the color() vector.
>
> -tgs
>
> data<-as.data.frame(matrix(rnorm(47*23),ncol=47))
> boxplot(data,col=colors()[1:47])
>
>
>
>
> On Thu, Oct 7, 2010 at 2:22 PM, ANJAN PURKAYASTHA <
> anjan.purkayastha@gmail.com> wrote:
>
>> Hi,
>> I have a data set of 47 columns. I would like to create a boxplot for each
>> column, each boxplot of a different colour.
>> So I created a vector "col1". This vector has a subset of the colors
>> returned by color()- "red", "cyan", "green" etc.
>> Now I use the command: boxplot(dataset, col= col1) expecting to see 47
>> boxplots, each of a different colour.
>> Here is the problem: the boxplots are drawn correctly but it seems that
>> only
>> the first few colours in col1 are being used in a repeated pattern.
>> Anybody has any ideas on how to tackle this?
>> Thanks in advance,
>> Anjan
>>
>> --
>> ===================================
>> anjan purkayastha, phd.
>> research associate
>> fas center for systems biology,
>> harvard university
>> 52 oxford street
>> cambridge ma 02138
>> phone-703.740.6939
>> ===================================
>>
>>        [[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.
>>
>
>


-- 
===================================
anjan purkayastha, phd.
research associate
fas center for systems biology,
harvard university
52 oxford street
cambridge ma 02138
phone-703.740.6939
===================================

	[[alternative HTML version deleted]]

