[R] color palettes

Jim Lemon jim at bitwrit.com.au
Sat Aug 9 01:32:26 CEST 2014


On Fri, 8 Aug 2014 06:26:35 AM carol white wrote:
> Hi,
> Is there any way to take one color of each color family from a color
> palettes like rainbow? For ex, if there are different blues 
differentiated
> by intensity, hue etc, taking one of them. In this case, when using
> rainbow(n), then how to select 1 color of each family, for ex 1 blue, 1 
red
> etc? It doesn't matter which intensity, hue etc is taken as long as 1 
color
> from each family is taken.
> 
> 
Hi Carol,
Since you have asked a question about a fundamental aspect of 
graphic representation, I'll try to answer it. Be warned, it will be a 
rather discursive answer.

Whenever we try to communicate information about a number of 
things, where the information is different for each thing, it is essential 
to securely link the correct information to each thing. In compact 
graphic representations such as R plots, this usually resolves to labels 
of some sort. So we could construct a pie chart of the number of 
emails sent by each person in the present discourse using the names 
of the people involved. If we simply label each sector of the resulting 
plot with the names of the people, it will be reasonably informative in 
displaying each person's contribution.

If we venture beyond the comfortable pale of the R help list and try to 
do this with something like Twitter, where I understand there may be 
thousands or even millions of contributors on a subject, the pie chart 
blurs into a chromatic dazzle with an unintelligible fringe of names. We 
might try to rescue the situation by aggregating the tweets into a few 
categories such as helpful, sarcastic and noise, but this does not solve 
the problem of how to display the comparative contributions of the 
twits involved.

So one answer to your question of "How can I intelligibly label 
hundreds of things with colors?" may be "You can't unless your 
audience is made up of spectrographs." Plots that attempt to display 
information about too many things using line types, symbol types and 
colors often simply confuse the audience.

My feeling is that it is the responsibility of the person choosing the 
method of communication to make sure that it communicates well. So 
if we want to display something meaningful about the hypothetical 
pandemonium of tweets above, we might choose to display the 
categories (helpful, sarcastic and noise) broken down by the sex of the 
twits. Perhaps in your case you might want to break down the 
functional category of the genes you are examining by the up- or 
down-regulation of those genes in different cell types.

Your question touches things like "How many letters should there be in 
the alphabet?" and "How many acronyms for psychological tests can 
be meaningfully used in a paragraph?" At any rate, I thank you for 
giving me an idea about graphic illustration.

Jim



More information about the R-help mailing list