library(MESS) pairs(~ Ozone + Temp + Wind + Solar.R, data=airquality, lower.panel=panel.smooth, upper.panel=panel.r2, diag.panel=panel.hist, col.bar=myblue, col.smooth=myblue, lwd=6)