Re: [R] image plot but data not on grid.

2010-08-09 Thread Hadley Wickham
With sweave, you need to explicitly print() the output of ggplot2 and lattice plots. Hadley On Mon, Aug 9, 2010 at 6:32 AM, W Eryk Wolski wrote: > qplot does (?) what I was looking for! > At least it plots what I want to plot in the interactive modus. > However, it seems not to work with Sweave.

Re: [R] image plot but data not on grid.

2010-08-09 Thread W Eryk Wolski
qplot does (?) what I was looking for! At least it plots what I want to plot in the interactive modus. However, it seems not to work with Sweave. Thanks On 7 August 2010 16:15, Michael Bedward wrote: >> If it's regular, but incomplete, that method will work.  If it's >> irregular, then no imag

Re: [R] image plot but data not on grid.

2010-08-07 Thread Michael Bedward
> If it's regular, but incomplete, that method will work.  If it's > irregular, then no image method will work without first interpolating > a regular grid. Thanks Hadley. As I suspected, but ggplot2 is so very clever that I thought it was worth asking :) Michael ___

Re: [R] image plot but data not on grid.

2010-08-07 Thread Hadley Wickham
On Sat, Aug 7, 2010 at 2:54 AM, Michael Bedward wrote: > On 7 August 2010 06:26, Hadley Wickham wrote: > >> library(ggplot2) >> qplot(x, y, fill = z, data = df, geom = "tile") > > Hi Hadley, > > I read the original question as being about irregularly spaced data. > The above method doesn't seem to

Re: [R] image plot but data not on grid.

2010-08-07 Thread Michael Bedward
On 7 August 2010 06:26, Hadley Wickham wrote: > library(ggplot2) > qplot(x, y, fill = z, data = df, geom = "tile") Hi Hadley, I read the original question as being about irregularly spaced data. The above method doesn't seem to for me in such a case but perhaps I'm constructing my example incorr

Re: [R] image plot but data not on grid.

2010-08-06 Thread Hadley Wickham
On Fri, Aug 6, 2010 at 9: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.

Re: [R] image plot but data not on grid.

2010-08-06 Thread David Winsemius
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 some

Re: [R] image plot but data not on grid.

2010-08-06 Thread Martyn Byng
Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of W Eryk Wolski Sent: 06 August 2010 15:25 To: r-help@r-project.org Subject: [R] image plot but data not on grid. Hi, Would like to make an image however the values in z are not on an uniform grid.

[R] image plot but data not on grid.

2010-08-06 Thread W Eryk Wolski
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 cleve