title: How to create a multiple plots having same X axis?
body: <p>I am trying to make a single plot using dataset with same X axis but different Y axis. As an example, I have this dataset: </p>
  
  <pre class="lang-r prettyprint-override"><code>A1 &lt;- rnorm(100)
  B1 &lt;- rnorm(100)
  B2 &lt;- rnorm(100)
  B3 &lt;- rnorm(100)
  
  grid &lt;- matrix(c(1:3),nrow=3,ncol=1,byrow=TRUE)
  layout(grid)
  
  plot(A1,B1)
  plot(A1,B2)
  plot(A1,B3)
  </code></pre>
  
  <p>This is what I get and comes with multiple X axis:</p>
  
  <p><a href="https://i.stack.imgur.com/TdHKQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdHKQ.png" alt="enter image description here"></a></p>
  
  <p>I know how to do it using <code>ggplot2</code> but I am looking for another way like using <code>layout</code>. Any help would be much appreciated.</p>