Skip to content

How to create a graph layout?

3 messages · Christian Bustamante, Sarah Goslee, Cuvelier Etienne

#
I all,
I want to create a graph layout in a 3x3 matrix like this:

ylab  |__|  |__|   |__|
       ___  ___   ___
ylab  |__|  |__|   |__|
       ___  ___   ___
ylab  |__|  |__|   |__|
        xl     xl     xl

With this layout, then I'll insert the 9 plots. How ca I create it?
#
For base graphics, you can do it with par - specifically
mfrow or mfcol
par(mfrow=c(3,3)).

Depending on exactly what you want, you might also
wish to look into axis().

For fancier set-ups, the lattice package provides many
options.

Sarah
On Sun, Apr 26, 2009 at 8:32 PM, Christian Bustamante <cdeb77 at gmail.com> wrote:

  
    
#
At 02:32 27/04/2009, Christian Bustamante wrote:
see ?layout
# Example
layout(matrix(1:9,ncol=3, byrow=TRUE))
for(i in 1:9) plot(density(rnorm(1000)), main=paste("Graph N?",i))

Hope it helps.

Etienne
================================================
+                                                                             
+ Cuvelier Etienne                                                    
+ Assistant                                                             
+ FUNDP - Facult? d'Informatique                              
+ rue Grandgagnage, 21   B-5000 Namur (Belgique)
+ tel: 32.81.72.49.75    fax: 32.81.72.49.67
+ skype: cuvelier.etienne
================================================
THE TOP TEN REASONS TO BECOME A STATISTICIAN
 1. Deviation is considered normal.
 2. We feel complete and sufficient.
 3. We are "mean" lovers.
 4. Statisticians do it discretely and continuously.
 5. We are right 95% of the time.
 6. We can legally comment on someone's posterior distribution.
 7. We may not be normal but we are transformable.
 8. We never have to say we are certain.
 9. We are honestly significantly different.
10 No one wants our jobs.