[R] (offtopic) I need two sets of 5 different color scales
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sat Apr 10 14:55:25 CEST 2004
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
More information about the R-help
mailing list