[R] Selecting a subplot of pairs

2005-01-21 Thread Yves Brostaux
Hello,
I'm trying to plot a set of 3 dependant variables (y) against 4 
predictors (x) in a matrix-like plot, sharing x- an y-axis for all the 
plot on the same column/line :

y1/x1   y1/x2   y1/x3   y1/x4
y2/x1   y2/x2   y2/x3   y2/x4
y3/x1   y3/x2   y3/x3   y3/x4
In fact, this plot is a rectangular selection of the result of pairs(), 
limited to the relations between x's and y's and excluding those within 
x's and y's. I managed to recreate such a plot using a script with 
layout(), axis() and so on, but I was wondering if there already exists 
a clean function for such a task, in case I would encounter this problem 
again ?

--
Ir. Yves BROSTAUX
Unité de Statistique et Informatique
Faculté universitaire des Sciences agronomiques de Gembloux (FUSAGx)
8, avenue de la Faculté
B-5030 Gembloux
Belgique
Tél: +32 81 62 24 69
Email: [EMAIL PROTECTED]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Selecting a subplot of pairs

2005-01-21 Thread Uwe Ligges
Yves Brostaux wrote:
Hello,
I'm trying to plot a set of 3 dependant variables (y) against 4 
predictors (x) in a matrix-like plot, sharing x- an y-axis for all the 
plot on the same column/line :

y1/x1   y1/x2   y1/x3   y1/x4
y2/x1   y2/x2   y2/x3   y2/x4
y3/x1   y3/x2   y3/x3   y3/x4
In fact, this plot is a rectangular selection of the result of pairs(), 
limited to the relations between x's and y's and excluding those within 
x's and y's. I managed to recreate such a plot using a script with 
layout(), axis() and so on, but I was wondering if there already exists 
a clean function for such a task, in case I would encounter this problem 
again ?

The functionality in packages grid and lattice is your friend (if you 
dislike it, you can twiddle with par()'s argument mfrow).

Uwe Ligges
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Selecting a subplot of pairs

2005-01-21 Thread Deepayan Sarkar
On Friday 21 January 2005 03:13, Yves Brostaux wrote:
 Hello,

 I'm trying to plot a set of 3 dependant variables (y) against 4
 predictors (x) in a matrix-like plot, sharing x- an y-axis for all
 the plot on the same column/line :

 y1/x1   y1/x2   y1/x3   y1/x4
 y2/x1   y2/x2   y2/x3   y2/x4
 y3/x1   y3/x2   y3/x3   y3/x4

 In fact, this plot is a rectangular selection of the result of
 pairs(), limited to the relations between x's and y's and excluding
 those within x's and y's. I managed to recreate such a plot using a
 script with layout(), axis() and so on, but I was wondering if there
 already exists a clean function for such a task, in case I would
 encounter this problem again ?

You could use xyplot from lattice as:

xyplot(y1 + y2 + y3 ~ x1 + x2 + x3 + x4, data=, outer=TRUE)

You can add relation=free to get column and row-specific axis limits, 
but they will be shown for every panel.

Hope that helps,

Deepayan

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html