next up previous
Next: Miscellaneous graphics commands Up: Graphics and output Previous: Nice dots/points in scatterplots

Placing multiple labels in the outer margin

I often find myself with a rectangular array of plots (e.g., 3 rows and 4 columns), where I want to label each row and each column, but without repeating labels across every subplot. A good approach is to put the labels in the outer margin. This allows one to eliminate redundant white space around the subplots. You can do this using mtext(). For example to put labels above each column: 
> mtext('Winter',at=.15,side=3,outer=T,cex=1.2) 
> mtext('Spring',at=.35,side=3,outer=T,cex=1.2) 
> mtext('Summer',at=.65,side=3,outer=T,cex=1.2) 
> mtext('Fall',at=.85,side=3,outer=T,cex=1.2)

Keywords: R, plotting, outer margin, labels, multiple panels

Created: 1/20/12.



Chris Paciorek 2012-01-21