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: brostaux.y at fsagx.ac.be
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
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