Tamas Papp
2004-Apr-10 11:09 UTC
[R] (offtopic) I need two sets of 5 different color scales
Hi, I am plotting a policy function (result from a dynamic stochastic optimization problem, discretized approximation). The policy function maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space (B and F are usually between 4-6, and represent domestic and foreign savings. The other variables are income (Y), inflation (Pi), domestic and foreign interest rates (R and Z)). I actually wrote a plotting function to represent all this, the result is attached -- please have a look at it and help me... I need advice in the following: I need two sets of colors for B and F which are easy to distinguish (when printed on a color laser printer), represent cardinality (ie have an intuitive mapping to an interval) or at least ordinality. I have experimented with the following: Bcolors <- hsv(.6, seq(0.2, 1, length=5), 1) Fcolors <- hsv(seq(.1,0, length=5), seq(0.2, 1, length=5) this is what you see in the plot. What colors would you use? Do you think that varying both brightness and hue helps to distinguish colors? Should I change saturation, too? Thanks, Tamas PS.: The plot is simply gzipped. If you need a zipped version, or the source code, contact me. -- Tam?s K. Papp E-mail: tpapp at axelero.hu Please try to send only (latin-2) plain text, not HTML or other garbage.
Tamas Papp
2004-Apr-10 11:20 UTC
The list engine removed the .eps.gz attachment [Re: [R] (offtopic) I need two sets of 5 different color scales]
On Sat, Apr 10, 2004 at 01:09:18PM +0200, Tamas Papp wrote:> PS.: The plot is simply gzipped. If you need a zipped version, or the > source code, contact me.It appears to be removed by the list engine. Is it possible to send eps files to the list? I gzipped it because it was 90k originally, but 8k compressed. What should I do, send the uncompressed version? The posting guide says: "No binary attachments except for PS, PDF, and some image and archive formats", that means no gzipped versions of these? Thanks Tamas -- Tam??s K. Papp E-mail: tpapp at axelero.hu Please try to send only (latin-2) plain text, not HTML or other garbage.
Uwe Ligges
2004-Apr-10 12:55 UTC
[R] (offtopic) I need two sets of 5 different color scales
Tamas Papp wrote:> Hi, > > I am plotting a policy function (result from a dynamic stochastic > optimization problem, discretized approximation). The policy function > maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space > (B and F are usually between 4-6, and represent domestic and foreign > savings. The other variables are income (Y), inflation (Pi), domestic > and foreign interest rates (R and Z)). I actually wrote a plotting > function to represent all this, the result is attached -- please have > a look at it and help me... > > I need advice in the following: I need two sets of colors for B and F > which are easy to distinguish (when printed on a color laser printer), > represent cardinality (ie have an intuitive mapping to an interval) or > at least ordinality. > > I have experimented with the following: > > Bcolors <- hsv(.6, seq(0.2, 1, length=5), 1) > Fcolors <- hsv(seq(.1,0, length=5), seq(0.2, 1, length=5) > > this is what you see in the plot. What colors would you use? Do you > think that varying both brightness and hue helps to distinguish > colors? Should I change saturation, too?Hmm, Ross Ihaka has given a talk at the DSC2003 conference about constructing sensible colors. Unfortunately, there is no paper available at http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/ ... Some notes and a color package are available at http://www.stat.auckland.ac.nz/~ihaka/color/ Also, you might want to look at the package RColorBrewer available at CRAN. The package is supposed to provide palettes of sensible colors. Uwe Ligges PS: If you want to send any attachments: Preferably upload to a web site and just post the link.> Thanks, > > Tamas > > PS.: The plot is simply gzipped. If you need a zipped version, or the > source code, contact me. > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Matthias.Kohl@uni-bayreuth.de
2004-Apr-10 15:24 UTC
[R] (offtopic) I need two sets of 5 different color scales
maybe, the RColorBrewer package does what you want? see also: ColorBrewer.org> Hi, > > I am plotting a policy function (result from a dynamic stochastic > optimization problem, discretized approximation). The policy function > maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space (B > and F are usually between 4-6, and represent domestic and foreign > savings. The other variables are income (Y), inflation (Pi), domestic > and foreign interest rates (R and Z)). I actually wrote a plotting > function to represent all this, the result is attached -- please have a > look at it and help me... > > I need advice in the following: I need two sets of colors for B and F > which are easy to distinguish (when printed on a color laser printer), > represent cardinality (ie have an intuitive mapping to an interval) or > at least ordinality. > > I have experimented with the following: > > Bcolors <- hsv(.6, seq(0.2, 1, length=5), 1) > Fcolors <- hsv(seq(.1,0, length=5), seq(0.2, 1, length=5) > > this is what you see in the plot. What colors would you use? Do you > think that varying both brightness and hue helps to distinguish > colors? Should I change saturation, too? > > Thanks, > > Tamas > > PS.: The plot is simply gzipped. If you need a zipped version, or the > source code, contact me. > > -- > Tam??s K. Papp > E-mail: tpapp at axelero.hu > Please try to send only (latin-2) plain text, not HTML or other garbage.
Thomas Lumley
2004-Apr-12 14:21 UTC
[R] (offtopic) I need two sets of 5 different color scales
On Sat, 10 Apr 2004, Tamas Papp wrote:> > I need advice in the following: I need two sets of colors for B and F > which are easy to distinguish (when printed on a color laser printer), > represent cardinality (ie have an intuitive mapping to an interval) or > at least ordinality.It's not offtopic. This is what the RColorBrewer package is for. If you look at Cindy Brewer's web version (www.colorbrewer.org) there is additional information about which scales work well on projectors, cheap color printers, for people with red-green vision anomalies, and so on. (It would be nice to have these additional data in the R package) -thomas> > I have experimented with the following: > > Bcolors <- hsv(.6, seq(0.2, 1, length=5), 1) > Fcolors <- hsv(seq(.1,0, length=5), seq(0.2, 1, length=5) > > this is what you see in the plot. What colors would you use? Do you > think that varying both brightness and hue helps to distinguish > colors? Should I change saturation, too? > > Thanks, > > Tamas > > PS.: The plot is simply gzipped. If you need a zipped version, or the > source code, contact me. > > -- > Tamä˝±s K. Papp > E-mail: tpapp at axelero.hu > Please try to send only (latin-2) plain text, not HTML or other garbage. >Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle