[R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Jannis
Dears, before I start programming my own function I would like to ask you whether there is any function already available that lets me plot a x/y plot with the colors of the points determined by scaling a third variable z into a defined colorramp? Until now I am using a wild combination of

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Jim Lemon
On 05/19/2010 08:24 PM, Jannis wrote: Dears, before I start programming my own function I would like to ask you whether there is any function already available that lets me plot a x/y plot with the colors of the points determined by scaling a third variable z into a defined colorramp? Until

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Paul Hiemstra
Hi Jannis, You can have a look at image(), or alternatively look at spplot. The latter assumes that you have your data structured according to the spatial R classes that the sp-package provides: library(sp) data(meuse.grid) head(meuse.grid) summary(meuse.grid) # transform to sp-object

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread baptiste auguie
Hi, See also ?lattice::xyplot and ?ggplot2::geom_point , either one can do it automatically. HTH, baptiste On 19 May 2010 12:24, Jannis bt_jan...@yahoo.de wrote: Dears, before I start programming my own function I would like to ask you whether there is any function already available that

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Felix Andrews
And made slightly easier with panel.levelplot.points from latticeExtra: http://latticeextra.r-forge.r-project.org/#panel.levelplot.points On 19 May 2010 22:24, baptiste auguie baptiste.aug...@googlemail.com wrote: Hi, See also ?lattice::xyplot and ?ggplot2::geom_point , either one can do it

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Daisy Englert Duursma
the package ggplot2 makes it really really easy! qplot(x,y,data=yourdataset, colour= color) __ 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

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Daisy Englert Duursma
Sorry, that should be qplot(x,y,data=yourdataset, colour= z) On Thu, May 20, 2010 at 3:07 PM, Daisy Englert Duursma daisy.duur...@gmail.com wrote: the package ggplot2 makes it really really easy! qplot(x,y,data=yourdataset, colour= color) -- Daisy Englert Duursma Room E8C156 Dept.