On Aug 6, 2010, at 10:24 AM, W Eryk Wolski wrote:

Hi,

Would like to make an image
however the values in z are not on an uniform grid.

Have a dataset with
length(x) == length(y) == length(z)
x[1],y[1] gives the position of z[1]

and would like to encode value of z by a color.

looking for something like
plot(x,y, col = z)
where col for z is cleverly chosen from a colorscale.

?palette
??palette  # for other coloring options
?colorRamp

# random integer index from default palette for coloring of random x,y points:

plot(rnorm(20), rnorm(20), col=palette()[ runif(20, 1,10) ]    )

# The cleverness is left to you.
--

David Winsemius, MD
West Hartford, CT

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

Reply via email to