Hi, Are your variable numerical? If so, you can do what you want by just define the color as the variable (col = variable3). Colors in R can be defined by numbers, so each number will corresponds to one color.
In example: plot( iris[, 1], iris[, 2], col = iris[,3]) Regards 2009/3/18 Josh <tejalonl...@gmail.com> > Hi, > I have three related variables (vectors) and would like to see their > distribution on a 2D plot of first two variables, having colors > proportional > to the values from third variable. I could have done so by passing 3rd > variable to the color palette, but this would disrupt the relationship > information among them. > I am sure there has to be some way to do it, but I don't know how. Any help > in this direction will be appreciated. > > thanks > jo > > [[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.