On Tue, 16 Sep 2014 09:34:39 PM wszsdmjj wrote: > I need to create a color vector with 4000 colors, and I have another > variable, it contains 4000 element. If my variable is number of bed, and I > want the color corresponds to the number of bed in this variable. How should > I do? > Hi wszsdmjj, I assume that you have 4000 numbers of which all may be different and you want to assign colors that will represent these values along some dimension. I think that the answer that John gave is probably correct, but if not, have a look at the color.scale function in the plotrix package.
Jim ______________________________________________ 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.