SLIDE 13 25
Multiple plots on one page
The par() function:
- comes with an extensive list of graphical parameters you can
change (see ?par)
- Some options are helpful; others you may never use
To plot multiple charts within the same window, you can use the mfcol or mfrow parameter For example, par(mfrow=c(2, 2) divides the graphic window into four panels (two rows and two columns) 26
Multiple plots on one page
Histogram
S p a r r
s $ T a r s u s D e n s i t y 1 9 2 0 2 1 2 2 2 3 2 4 2 5 . . 2 . 4 . 6 5 5 5 6 6 5 7 1 9 2 0 2 1 2 2 2 3 2 4 2 5 S p a r r
s $ Wi n g S p a r r
s $ T a r s u s F e m a l e M a l e 5 5 5 6 6 5 7
Boxplot
S e x Wi n g l e n g t h ( m m ) F e m a l e . S E S P Ma l e . S S T S 5 5 5 6 6 5 7 S p e c i e s a n d S e x Wi n g l e n g t h ( m m )
Histogram
S p a r r
s $ T a r s u s D e n s i t y 1 9 2 0 2 1 2 2 2 3 2 4 2 5 . . 2 . 4 . 6 5 5 5 6 6 5 7 1 9 2 0 2 1 2 2 2 3 2 4 2 5 S p a r r
s $ Wi n g S p a r r
s $ T a r s u s F e m a l e M a l e 5 5 5 6 6 5 7
Boxplot
S e x Wi n g l e n g t h ( m m ) F e m a l e . S E S P M a l e . S S T S 5 5 5 6 6 5 7 S p e c i e s a n d S e x Wi n g l e n g t h ( m m )
1 2 3 4 1 3 2 4
par(mfrow = c(2,2)) par(mfcol = c(2,2))