By default, pairs() puts the axes on all sides of the plot, alternating between the sides. However, I’m putting the correlation between the data sets in the upper triangle, so I want to adjust the axis position like this:

Which parameters do I need to set?
You could custumize the pairs function.
If you look at the code, the axis are drawn within 2 nested for-loops (one for rows and one for colums):
Here is a custimized pairs function, were I just edited the sides in localAxis() within these for-loops:
Edit
Changed pairs2(), so that the axis appear only on the lower diagonal.