Re: [R] scatter plot matrix with different x-y variables

2013-05-13 Thread adel daoud
Greg, the pairs2 function was exactly what I wanted. Thanks for a very useful function. May I ask a follow up question, is it possible to draw a correlation line with R2 values for each graph – on each graph, or on the side of the graph. I am sure this is possible somehow, but I am new to R program

Re: [R] scatter plot matrix with different x-y variables

2013-05-11 Thread Greg Snow
The pairs2 function in the TeachingDemos package does what you describe. You give it 2 matricies instead of just one and it creates the plots. On Wed, May 8, 2013 at 10:49 AM, Adel wrote: > Dear list-members, > > I wonder if there is a way of creating a scatter plot table/grid with > different

Re: [R] scatter plot matrix with different x-y variables

2013-05-08 Thread John Kane
Several ways but I find that grid.arrange in the gridExtra package combined with ggplot2 to draw the actual graphs works nicely. You might also want to look mfcol or mfrow in ?par ### quick and dirty example of ggplot2/gridExtra library(ggplot2) library(gridExtra) mdat <- data.frame(a= 1:5