Re: [R] Regions of significance plots with ggplot2

2012-06-05 Thread baptiste auguie
Hi, On 6 June 2012 08:58, Paul Murrell wrote: > Hi > > Here's one way to approach it ... > > ggplot(data.frame(x=1:10, y=1:10)) + >  geom_polygon(aes(x=xx, y=yy), fill="grey70", >               data=data.frame(xx=c(0, 0, 4, 4), yy=c(0, 11, 11, 0))) + >  geom_point(aes(x=x, y=y)) > > ... (supply a

Re: [R] Regions of significance plots with ggplot2

2012-06-05 Thread Paul Murrell
Hi Here's one way to approach it ... ggplot(data.frame(x=1:10, y=1:10)) + geom_polygon(aes(x=xx, y=yy), fill="grey70", data=data.frame(xx=c(0, 0, 4, 4), yy=c(0, 11, 11, 0))) + geom_point(aes(x=x, y=y)) ... (supply a separate data source for the background region polygon). Pa

[R] Regions of significance plots with ggplot2

2012-06-03 Thread Dominic Comtois
I'd like to create a plot similar to this one from Kochanska et al. (Development and Psychopathology, 2011): http://pages.videotron.com/do999/r-help/Kochanska_graph_ros.jpg I am new to ggplot2 and can't see any obvious way t