Re: [R] Heatmap in R and/or ggplot2

2011-06-15 Thread idris
Thanks for the tip on the limit attribute on scale_fill_gradientn. I'll check out mencoder and let you know if I use your code for the movie. Cheers -- View this message in context: http://r.789695.n4.nabble.com/Heatmap-in-R-and-or-ggplot2-tp3594590p3600034.html Sent from the R help mailing li

Re: [R] Heatmap in R and/or ggplot2

2011-06-15 Thread JiHO
On Tue, Jun 14, 2011 at 19:56, idris wrote: > Follow up question: My data contains x, y, height, and day. > > I want to create the heatmap for each day, keeping the color coding > consistent. > > I've created an example with 2 days, and you can see the charts below. > > Notice that the legend chan

Re: [R] Heatmap in R and/or ggplot2

2011-06-14 Thread idris
Thanks for your help! Follow up question: My data contains x, y, height, and day. I want to create the heatmap for each day, keeping the color coding consistent. I've created an example with 2 days, and you can see the charts below. Notice that the legend changes from day 1 to day 2. How can I

Re: [R] Heatmap in R and/or ggplot2

2011-06-13 Thread baptiste auguie
Hi, Try this ggplot(df, aes(x,y)) + geom_tile(aes(fill=height), colour="white") + scale_fill_gradientn(colours = c("red", "gold", "green")) + geom_text(aes(lab=height)) HTH, baptiste On 14 June 2011 07:12, idris wrote: > I have a dataframe df with columns x, y, and height. I want to create a

[R] Heatmap in R and/or ggplot2

2011-06-13 Thread idris
I have a dataframe df with columns x, y, and height. I want to create a heatmap-like plot that creates a grid of x by y, and then color codes the grid depending on the value of height. Is there a ggplot2 object to do this? I'm able to easily do this in Excel with pivot tables and conditional forma