I have too much whitespace around the outside of my pairs() plot. How can one control the outer margins in a pairs() plot? 
Changing oma for example does nothing (i.e. par(oma=c(0,0,0,0)) makes no difference). 
tl;dr use oma as an argument within your pairs() call.
As usual, it's all in the documentation, albeit somewhat obscurely. ?pairs states:
Also, graphical parameters can be given as can arguments to ‘plot’ such as ‘main’. ‘par("oma")’ will be set appropriately unless specified.
This means that pairs() tries to do some clever stuff internally to set the outer margins (based on whether a main title is requested); it will ignore external par("oma") settings, only paying attention to internal settings.  The "offending" line within the code of stats:::pairs.default is:
  if (is.null(oma)) 
        oma <- c(4, 4, if (!is.null(main)) 6 else 4, 4)
Thus setting oma within the call does work:
par(bg="lightblue")  ## so we can see the plot region ...
z <- matrix(rnorm(300),ncol=3)
pairs(z,oma=c(0,0,0,0))

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With