[R] Selecting / creating unique colours for behavioural / transitional data

Ross Culloch ross.culloch at dur.ac.uk
Sat Mar 14 11:24:52 CET 2009


Hi Jim, that works, which is great!!! Alexis also gave me an answer that
works if you wanted to look at that post, but that was based on adding
colours to existing Sets from BrewerColor. However, your answer is the first
i've got where you can actuall pick your entire palette, it's something that
has bugged me for a while so it's great to finally find out! 

Thanks again, it is much appreciated!

Ross


Jim Lemon-2 wrote:
> 
> Ross Culloch wrote:
>> Hi Kingsford,
>>
>> Thanks yet again for your help! I have tried this, and once again i have
>> failed! I have put the code that i've used below (i'm sure you'll note
>> some
>> bad practice) if that is any use to help explain where i'm going wrong,
>> it
>> seems to run fine and feeds back just what you noted it would, but i
>> still
>> get the error message as before - if you have any more suggestions i'd be
>> very greatful, i'm sure it is down to me missing something very simple!
>>   
> Hi Ross,
> See if this will do what you want:
> 
> library(plotrix)
> color2D.matplot(matrix(0,nrow=3,ncol=5),
>  cellcolors=c("#ff0000","#ddcc00","#00ff00","#00ddcc","#0000ff",
>  "#886644","#668844","#44bb22","#448866","#446688",
>  "#aa00aa","#ccccaa","#88ddaa","#88aadd","#cc88ee"))
> 
> What I have done is to start with five base colors and vary saturation 
> and brightness sort of orthogonally. I just did this one by guess and by 
> gosh and only had to change one color. You don't have to use 
> color2D.matplot, but it is easy to compare the colors if they are in a 
> rectangular block.
> 
> Jim
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Selecting---creating-unique-colours-for-behavioural---transitional-data-tp22492438p22511206.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list