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
programming so please just direct me into the right direction.



John, the grid.arrange() function is useful too but not exactly what I
needed. Thanks any way.



Best



Adel


On Sat, May 11, 2013 at 4:52 PM, Greg Snow <538...@gmail.com> wrote:

> 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 <adelda...@gmail.com> wrote:
>
>> Dear list-members,
>>
>> I wonder if there is a way of creating a scatter plot table/grid with
>> different variables on the y-axis compared to the x-axis? Something like
>> this:
>>
>>  A***
>> B***
>> C***
>> -XYZ
>>
>>
>> I know that you can create scatter plot matrix with the same variables on
>> the
>> y-axis as on the x-axis, like this:
>>
>>
>>
>> A*****
>> *B****
>> **C***
>> ***X**
>> ****Y*
>> *****Z
>>
>> But this is not what I want. I basically want to get a visual
>> representation of different dependent variables (y-axis) on various
>> independent variables (x-axis). So I want it to look like a scatter plot
>> matrix or grid, but with my own specified variables on each axis.
>>
>> Secondly, to add to this, can I add a correlation line (linear and
>> quadratic)
>> through all scatter plots with both correlation and R2 values?
>>
>>
>> All help appreciated.
>>
>> Adel
>>
>> --
>> Adel Daoud, PhD
>> Department of Sociology,  University of Gothenburg
>> Box 720
>> 405 30 Göteborg, SWEDEN
>> Visiting address: Sprängkullsgatan 25, room F411
>> +46 031-786 47 84
>> adel.da...@sociology.gu.se
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/scatter-plot-matrix-with-different-x-y-variables-tp4666598.html
>> Sent from the R help mailing list archive at Nabble.com.
>>         [[alternative HTML version deleted]]
>>
>>
>> ______________________________________________
>> 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
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> 538...@gmail.com
>



-- 
Adel Daoud, PhD
Department of Sociology,  University of Gothenburg
Box 720
405 30 Göteborg, SWEDEN
Visiting address: Sprängkullsgatan 25, room F411
+46 031-786 47 84
adel.da...@sociology.gu.se

        [[alternative HTML version deleted]]

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to