I am trying to add a simple legend to a customized pairs graph.
Here is the reproductible code (without my customized pairs function) :
layout(cbind(1,2),width=c(1,1))
layout.show(2)
pairs(USJudgeRatings)
Why is the pairs function "erasing" my layout information ?
A warning contained in the help for
layout
isUnfortunately,
pairs
usesmfrow
for arranging the plots.Using the hints from Duncan Murdoch and Uwe Ligges on R help, you can set
oma
to a reasonable value to give you room for a legend on the side, eg