Re: [R] alternatives to RColorBrewer?

2008-04-24 Thread Dieter Menne
Andrew Yee andrewjyee at gmail.com writes:

 
 I've found RColorBrewer useful for its qualitative palettes, but wished that
 it could generate more than 12 qualitative palettes (e.g. with Set3).  Any
 suggestions for alternative color palette generators that can handle e.g. 18
 distinctive colors?  (I'm aware of using rainbow(), but this doesn't
 generate enough distinct colors when the number of palettes is large).

Assume you want 40 colors, get a basic color palette from RcolorBrewer, and use
colorRampPalette to interpolate

# Brewer palette Paired 12
pal12 = c(#A6CEE3, #1F78B4, #B2DF8A, #33A02C, #FB9A99, 
#E31A1C, #FDBF6F, #FF7F00, #CAB2D6, #6A3D9A,
#99, #B15928)

colorRampPalette(pal12)(40)

Dieter

__
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.


Re: [R] alternatives to RColorBrewer?

2008-04-24 Thread Achim Zeileis
On Thu, 24 Apr 2008, Andrew Yee wrote:

 I've found RColorBrewer useful for its qualitative palettes, but wished that
 it could generate more than 12 qualitative palettes (e.g. with Set3).  Any
 suggestions for alternative color palette generators that can handle e.g. 18
 distinctive colors?  (I'm aware of using rainbow(), but this doesn't
 generate enough distinct colors when the number of palettes is large).

Package vcd implements several palette generators in HCL space which are
somewhat similar to the palettes in ColorBrewer but provide some more
flexibility. The underlying ideas are explained here
  http://epub.wu-wien.ac.at/dyn/openURL?id=oai:epub.wu-wien.ac.at:epub-wu-01_c87
See also help(rainbow_hcl, package = vcd) which has a few more
examples. However, I guess that it will be hard to select a qualitative
palette with 18 distinct colors...I couldn't imagine a plot where it would
be sufficiently easy for humans to decode that. But maybe you can combine
that with some sequential or diverging palette or so?

Best,
Z

 Thanks,
 Andrew

   [[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.


Re: [R] alternatives to RColorBrewer?

2008-04-24 Thread Andrew Yee
Great, thanks, that was helpful.

Andrew

On Thu, Apr 24, 2008 at 2:15 PM, Achim Zeileis [EMAIL PROTECTED]
wrote:

 On Thu, 24 Apr 2008, Andrew Yee wrote:

  I've found RColorBrewer useful for its qualitative palettes, but wished
 that
  it could generate more than 12 qualitative palettes (e.g. with Set3).
  Any
  suggestions for alternative color palette generators that can handle e.g.
 18
  distinctive colors?  (I'm aware of using rainbow(), but this doesn't
  generate enough distinct colors when the number of palettes is large).

 Package vcd implements several palette generators in HCL space which are
 somewhat similar to the palettes in ColorBrewer but provide some more
 flexibility. The underlying ideas are explained here

 http://epub.wu-wien.ac.at/dyn/openURL?id=oai:epub.wu-wien.ac.at:epub-wu-01_c87
 See also help(rainbow_hcl, package = vcd) which has a few more
 examples. However, I guess that it will be hard to select a qualitative
 palette with 18 distinct colors...I couldn't imagine a plot where it would
 be sufficiently easy for humans to decode that. But maybe you can combine
 that with some sequential or diverging palette or so?

 Best,
 Z

  Thanks,
  Andrew
 
[[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]]

__
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.


Re: [R] alternatives to RColorBrewer?

2008-04-24 Thread Dieter Menne
Achim Zeileis Achim.Zeileis at wu-wien.ac.at writes:
 However, I guess that it will be hard to select a qualitative
 palette with 18 distinct colors...I couldn't imagine a plot where it would
 be sufficiently easy for humans to decode that. But maybe you can combine
 that with some sequential or diverging palette or so?

I slightly disagree here. In many cases, in color-coded surface plots, you do
not want to attribute the colors to, let's say, altitudes, but rather use the
color transitions as contour lines without explicitly drawing contours. You
could also use continuous colors, but it is amazing how this fails, while
something like 25 colors looks good.

Dieter

__
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.


Re: [R] alternatives to RColorBrewer?

2008-04-24 Thread Achim Zeileis
On Thu, 24 Apr 2008, Dieter Menne wrote:

 Achim Zeileis Achim.Zeileis at wu-wien.ac.at writes:
  However, I guess that it will be hard to select a qualitative
  palette with 18 distinct colors...I couldn't imagine a plot where it would
  be sufficiently easy for humans to decode that. But maybe you can combine
  that with some sequential or diverging palette or so?

 I slightly disagree here. In many cases, in color-coded surface plots, you do
 not want to attribute the colors to, let's say, altitudes, but rather use the
 color transitions as contour lines without explicitly drawing contours. You
 could also use continuous colors, but it is amazing how this fails, while
 something like 25 colors looks good.

I think it depends a lot on what you want to bring out in such a graphic.
Qualitative palettes will convey the impression of different groups in
the data so that distinction of various levels is easier but the
impression of an underlying smooth curve is often lost. However, if you
use a sequential palette, the smoothness is conveyed much better and it is
easy to identify the peaks but much harder to compare other levels of
your curve.

(Re: my original comment. What I meant was that it would be challenging
to decode some truly categorical data, i.e., without an underlying
continuous scale, with 18 levels from a qualitative palette with 18
different colors.)

Best,
Z

 Dieter

 __
 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.