title: R- Multiple 3D scatterplots in one window
body: <p>I want to plot multiple 3D scatterplots in one window. For example, with 2D scatterplots:</p>
  
  <pre><code># data
  x1 &lt;- rnorm(10)
  y1 &lt;- rnorm(10)
  x2 &lt;- rnorm(10)
  y3 &lt;- rnorm(10)
  
  # two plots side-by-side in one window
  par(mfrow=c(1,2))
  plot(y1 ~ x1)
  plot(y2 ~ x2)
  </code></pre>
  
  <p>I am using the package <code>scatterplot3d</code>, but <code>mfrow</code> does not seem to work:</p>
  
  <pre><code># 3D data
  z &lt;- seq(-10, 10, 0.01)
  x1 &lt;- cos(z)
  x2 &lt;- cos(z+1)
  y &lt;- sin(z)
  
  # try to plot side by side
  par(mfrow=c(1,2))
  scatterplot3d(x1, y, z)
  scatterplot3d(x2, y, z)
  </code></pre>
  
  <p>Instead of appearing side-by-side, the second plot appears on top of the first plot. How can I put multiple 3D scatterplots in one plot window using R, either with <code>scatterplot3d</code> or another package? Also, I would like to be able to put both a 3D scatterplot and other regular 2D plots in the same plot window. </p>