title: Looking for a way to plot a pairwise scatterplot matrix where variables are in two groups
body: <p>Looking for a way to plot a pairwise scatterplot matrix where variables are in two groups, i.e. the plots need to be restricted to pairs between groups, excluding within-group pairs. For instance, the base <code>pairs()</code> produces this</p>
  <pre><code>    pairs(iris[1:4])
  </code></pre>
  <p><a href="https://i.stack.imgur.com/8JpNo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8JpNo.png" alt="enter image description here" /></a></p>
  <p>Whereas I am looking to, for example, correlate only sepal variables with petal variables, and am not interested in sepal (or petal) length-to-width correlations. So, instead of a 4x4 matrix, I'd need a 2x2 matrix.</p>
  <p>The solution would look something like this</p>
  <p><a href="https://i.stack.imgur.com/6Ue2n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Ue2n.png" alt="enter image description here" /></a></p>
  <p><code>pairs()</code> seems to support a formula argument, but <code>pairs(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width, data=iris)</code> doesn't look right. It's in the right direction giving a 3x3 matrix, but for some reason the two sepal variables are grouped.</p>
  <p>Preferably looking for a solution in <code>ggplot2</code> or <code>GGally::ggpairs()</code>.</p>